Create a GitHub Account

Hey guys, in this video, we will be looking at setting up GitHub accounts and installing the desktop clients. Now, GitHub is one of the largest open source development platforms that you find. It will allow you to remotely host your code, meaning you can host your code on their platform. And so if you’re seeing machine crashes with all of your source code, then you would have been checking in all of your changes on a regular basis. And they would all be, you know, documented and archived on GitHub. It is based on the gift protocol or the get technology which is a very popular open source control technology being used worldwide. And so if you understand how to use get through this exercise, then that will equip you to set foot into any organization and understand how to use source control. GitHub was recently acquired by Microsoft. And it remains free, free, because it allows you to host your code. And once you do that on the free basis, then your code is accessible to everybody on the internet, they do allow you to host it privately. But that is with some restrictions. And then you can also opt for the business option where you can pay a small fee monthly and have your code locked away from everybody who either wants to access it. You can get to GitHub by typing in GitHub comm and signing up and creating a new account is as easy as literally 123 so you put in a username and email address and a password, and then they will verify that you are you and you will be on the platform. I already have an account that I’ll be using. So I’ll just go ahead and sign in. And I can use my username which is for Williams and my password. squared. And once I have done that, I would have logged in, I can see all of my repositories. I have repositories from you know, previous expeditions you probably don’t see you would have an NTP and you can also go ahead and follow people, you can search for people here and follow them follow all of their activity, and they can in turn, follow you and keep track of your progress on the platform. Now there are two bits of software that you will need to install. The first one is the get software. So I’m just going to also search for just the word get. And I’m just going to download the get. So this is a library that will allow me to run get commands on my computer. So I’m just going to go ahead and download this and install And in addition to this, we want to download the GitHub for this stuff. So I can just say desktop that, which would lead me to this site. And so what you realize is that Git is actually very, very command line driven. So there are a bunch of commands that this client here will allow us to run to interact with it. And then what GitHub has done is abstracted the need for all of those commands and giving us a desktop application. So in this video, I’ll be showing you how to manage your products using or your projects rather, using the command line version and the desktop version. So firstly, let’s just walk through installing it, and we can just go ahead and click Next. With most of these options. We don’t have to change much and once we get through all of that, the installation mill Different for the environment that you’re installing it on. But ultimately, we just want to get get on the computer. At the end of this, I can just untick the release notes and others to finish. And then to see that get is properly installed, we can go ahead and launch our command prompt window, I already have my open from when I was doing composer and I can just write it. Alright, so that didn’t work. So I’m just going to read open my command prompt window. And let’s try that again. And so that looks more like it. So when I type the word get, then you should see something like this and that verifies that get has been installed successfully. Now when you download and install the GitHub for desktop, it will just ask you to sign in or sign up if you haven’t already done so. And that that is a pretty much straightforward procedure. It’s not really an installation, but it’s kind of like a standalone Up. As you can see, it is built with electron, which is a new technology for building cross site or cross platform applications. Now, there are a number of ways to get your code from your computer to GitHub. And in this case, our code would be these two files in our folder called new site. So we started building a site, hypothetically speaking, and we need to have a remote copy of our work on GitHub. So what we’re going to do is go on GitHub, having already signed in, and then we can create a new repository. And I’m going to call it new site. So I’m going to give it the same name as the website. I can give it a description, a sample site, or PHP tutorial. Alright, so that’s a quick description. I can leave it as public or you can choose to make it private, that’s fine, but I’ll just go ahead and Click Create repository. Now having done so this is basically an empty space. Considering that there is nothing here, we just created it. So they give us a bunch of commands that we can use to get our files from our computer into this remote holding space will also allow us to use our desktop. So I’m going to go with the creation of our pushing our code from our computer to this remote site first, and as the course goes along, we’ll see how we can use the desktop. So I’m just going to bring up my command prompt. And the first thing I want to do is navigate in command prompt to the folder that my project is in. So I can do CD C, and I know it’s in some, I can just press tab to autocomplete, HD dogs, and new. Alright, and now that I’m in Besides in the in the site folder, then I will start running these commands. So the first one I want to run is get in it. So I don’t want to create a file I already have. So I don’t need to create this file. So I’m just going to go ahead and say get in it, which is going to initialize a local Git repository. So the thing with get is that you have a repository on the machine, and you also can connect it for synchronization purposes to a remote repository. So GitHub is the remote one, but we by installing it would have set up our own local repository. So I’m going to say get in it, which is going to give us a little file there just to say, okay, as I get repository exists in this folder, and if we look inside that folder, we Oh, it’s a hidden file so you wouldn’t see it automatically. There we go. So we see that that was created. I just went to view and view hidden items and there is In that file is created. Now as we continue our process, we then say get commit. So this dip command essentially allows us to add a tag or a notation to what we’re about to do. So this is our first time pushing something to the repository. So we can just say like first commit or initial commit, that’s usually what you’ll see. But then let’s say we had to change the menu or we change the button, then you would want to be very explicit in this commit message so that if somebody else if you’re working on a team and somebody else comes along, they can surmise What changes is the there are in this commit to the remote repository. So this is especially useful for when you are looking back at the changes you made versus when somebody else has to look at all the changes you made, and make sense of it. So you want to be you know, you know, descriptive have enough with these commit messages so that it’s works well for other people. So I’m here seeing gets comfortable to what I first need to do is get add because I need to add all the files in the repository in the folder sorry. So I’m going to say get add full stop, which means all some adding all of these files to the register, so to speak. So once I do that, then I can say get commit once again, and there you see that I’m getting a different message because no, they’re added to the register. And they’re seeing Okay, now I know about a boat and I know about index. Alright, and know that I have committed what I need to do is push but then in order to push I need what you call a remote. So if you look at this line here, it is basically giving you like a path to what they call a remote and then we just break it down so it gets is the command Remote is the sub command. And then we’re seeing we’re adding a new remote, and we’re calling it origin. And this is the path to this remote, which is really just a path to this repository here on GitHub. Alright, so I’m adding I remote, or I’m creating a new variable, or key word, so to speak, called origin. And this origin represents the path to the remote repository on GitHub. And then after I add this new keyword, then I will need to push to the keyword and the what we call the master branch. Alright, so I’m just going to type in those two commands quickly. It remote, add origin, and then I’m just going to type out that or I can just copy and paste this I can just take this copy and then I can just break computer will to edit and paste it. So I don’t have to type all that long path and risk making a mistake, because that can be a point of frustration. And then when I press enter, you see, well, we didn’t get an error message. So something happened. And so I’m just going to copy this command, know that we realize we can just copy and paste. And I’m just going to paste it here and press Enter. And then what it will do is connect to this repository here on GitHub, and then send the files over, but then it’s asking you to login, so I’m going to have to log in. Alright, so I’m sure you’re seeing that this looks like a lot of work. I can assure you that this is a one time setup. When you just set up your repository and you want to make that first connection. This is a one time thing. And then further to that. That’s is why GitHub created their remotes. They’re there desktop applications. So even though I ordered it is logged on field, so I’m going to have to try that again. So username and the password. And there we go. So it was successful. And so once that is done, if I refresh on, this repository, then I will see my two files and my commit messages. So once again, if I make a change to any of these files on my local computer, then I will need to push those changes here. So that somebody if they land on this page, they can see Oh, he made this change to this file at that point. And that is essentially what GitHub is used for, as we go along in the project to see it in a more practical form. But this is really just to get you started and have an appreciation of why we need to get up