Add Project to Github

Hey guys, in this video, we will explore the steps towards getting our websites which is PHP primer up onto GitHub. Now in a previous video, we would have been guided towards creating a GitHub account and acquiring GitHub desktop. And if it is that you haven’t done so then you can always in your browser, go to, which will allow me to sign out because I’m signed in, which will ask you if you want to sign in or sign up. Of course, if you’ve already created our phones, you can sign in if you so deserve, and if you need to create a volunteer, you can always just use a username, email and password to get that process started. You can also go to desk to download the latest version of their native application that runs across all platforms. Once you have that downloaded, you can just go ahead And open that. So we’ll search for GitHub on our application server and wait for it to load. And then the first thing that we want to do is create a repository in our site folder. So our site folder is PHP underscore primer. So the first thing I’m going to do is go to File, go to add local repository, choose and then find the destination, which would be PHP primer, select that folder. And then because one does not appear to be a get repository, they’ll ask Would you like to create a repository here, so you can just click Create repository, and we can leave it with the name, PHP, primer is the path and then just click Create repository. Now once that process is done, you might see an extra directory you might also see additional files, but some of those are actually get related. And if you have hidden files turned on, then you start seeing some other files that you probably did not create. But that’s fine. It’s also that the server from GitHub can communicate with your local machine. Now the next thing that we want to do is actually publish repository. So I’m going to click Publish repository, which will actually send to GitHub that this repository should be added to my account. So I’ll go ahead and click Publish repository, which will then confirm with me the name that I intend to publish on GitHub. And also, if I want to keep it private ontic this because I want that if you stumble across my page, then you can have access to the code. And then I click Publish repository, which will then create the synchronization between my get library here and the one on GitHub. So if I log in to GitHub, through my browser and refresh, then I should see a folder named get a PHP primer, which will contain all of the files that were in my directory. Now, once again, here’s a practical example of why GitHub is important to have, especially in a team setting, if I needed to modify one of these files, and I go back to my site, and let’s say I did not want this button or I wanted an additional button, so whatever modifications I’m making, and I’m going to make this one primary, and then I’m going to make this one success. Alright, and I’m going to save my changes. I’m going to verify that these changes are in effect. So I have my three buttons, all beautifully styled by bootstrap. And then I need to share my side of the work with my co with my co workers on my teammates. Alright, so using both GitHub sorry, GitHub desktop, it’s actually tracking what changes occurred. So it’s showing me that these two lines of code were added, and then allowing me to actually upload. So the first thing I want to do when I upload is write a description, so that my teammates can come across and see what changes I made. So I can see I added two more buttons. And then I commit to master and then having committed successfully that would have been committed to my local get installation. So then I need to push the origin and origin is the connection to the actual GitHub server, which is where everybody is going to have to be connected. So I just push the origin and what will happen is that it will handle all of that synchronization between my company pewter code and the code on GitHub. So if I go back to GitHub, notice all of these, say initial commit, because by default, that’s what it would have sent up. But then when I refresh, I will see that index dot php, which is a file that I modified with the two new buttons is going to have a message indicating the difference between this and the previous version. So once again, source control uses for version control, or will change controls. Alright, so each time you make a change, you have to check it in and then your teammates can come across and get the latest code at all times and check in their code so that you can get the latest code at all times. So you can have multiple people modifying these files. And as long as they check in here, you can actually use GitHub to fetch or to go fetch origin, which will say give me an idea of how many changes are pending. Meaning how different are the files that are in GitHub from The files that are on my computer. So if George, who is my team member made changes to string manipulations and switch statement files, then the having fetch origin, it will actually indicate that, hey, your files are kind of different from the last set of ads that were uploaded, would you like to get them? And then I can just click another button, which would be pool. And so I wouldn’t see pool here because I’m the only one making changes to this repo. But in a team setting, he would ask do you want to pool and Upon doing so it would actually update your local files with the files from the server. So essentially, using GitHub or gleiche Technologies because the other good engines out there, but GitHub is probably the most popular one. And using it will help you to collaborate not only with immediate team with worked with the world, it’s a cool way to share your code with other people and it’s is a major proponent behind the open source movement nowadays. And I urge you to get involved start building pet projects and sharing your code with the world getting positive and creative and and useful feedback with your methods and just have fun. No, essentially, if you stumble across this on my profile, Trevor Williams PHP primer and you want to download it for yourself, what you can do is actually go to click on the repo because that didn’t make it private. And you can click clone or download, which will ask if you want to open in desktop and then further clone it to somewhere, or do you want to open it in Visual Studio, which would launch Visual Studio provided that you have it and with the code, or you could use this link to clone it to your machine. If you’re going to use command line or In the desktop, or you can just download the zip file, unzip it to your one, or XAMPP server and use it accordingly. So there are a number of ways you can actually get this code from GitHub from my profile to your machine. I hope you enjoyed this video and I hope you learned something new. As always, if you have any questions or comments, feel free to drop me a line and let me know