-In the interview that we did at the beginning of the class, - -2
-we talked with John about GitHub, where GitHub is a Git hosting website, and - -3
-John told you all about it. For this class, we will be - -4
-using GitHub as our Git hosting. Let's see how GitHub works in practice and - -5
-let's see some of the common features offered by GitHub. - -6
-This is what we'll do in the third part of this Git demo. What I'm showing here - -7
-is the GitHub website and as I said, GitHub is a Git hosting website and - -8
-you can create an account on GitHub by simply signing up on the website. And - -9
-because we already have an account that we're simply going to sign in - -10
-to see what kind of functionality GitHub offers. And we're going to specify our - -11
-username and password. And as you can see on the GitHub website, - -12
-you can use this menu up on the right to create a new repository or - -13
-change the account settings. Let's click on our user profile. And - -14
-here we can see some statistics for our user. For - -15
-example, we can see statistic about our contributions and our repositories. So - -16
-now if we go to the Repositories view, we can create a new repository. - -17
-We give it a name. Let's call it myrepo. We can provide the description for - -18
-the repository. If we want, we can initialize the repository by adding a README - -19
-file. And even though we are not doing it right now, if you can see up here, - -20
-you can also add a license here on the right and it allows you - -21
-to choose from a set of predefined licenses. And you can also a .gitignore file, - -22
-which, in case you don't know what that is, it's a very convenient file that - -23
-will automatically exclude from the repositories file that should not be added. - -24
-So if you remember in the lesson we said there are things that you should not - -25
-add to the repositories. For example, derived files. So - -26
-here, using this menu, you can pick the type of project that you have. - -27
-For example, Java project or PHP project or many other kinds of projects. And - -28
-the GitHub will automatically add that file for you. - -29
-But let's skip that for now and simply create our repository. And - -30
-that creates a repository that contains the README file because that's what we - -31
-decided to do. And it also allows you to edit the README file by clicking on it. - -32
-It will bring up an editor and here you can write, you know, - -33
-for example, initial readme for your project. Then you can add your - -34
-commit message up there and then you can commit the changes to your README file. - -35
-The site also provides many other features, like, for example, creating issues, - -36
-pull requests, adding and editing a wiki, and also, you know, - -37
-defining other characteristics and settings for the repository. Now, if we go to - -38
-the repository, you can see that we also get the HTTPS link for the repository. - -39
-So this is the URL that you can use to clone your repository. If you remember, - -40
-with a git clone command, that's the URL that you can specify. So - -41
-let's try to do that and clone that repository. So we're going to copy this URL. - -42
-To do that, we're going to execute git clone and specify the URL that we - -43
-just copied. And you can see that the project was created, was cloned locally. - -44
-And if we go under myrepo, which is the name of the repository, you can see that - -45
-the README file that we created on GitHub is here. So if we create a new file, - -46
-which we're going to call again, newFile just to be clear. And then we - -47
-can add it, commit it, specifying as usual a commit message. So at this point, - -48
-we can push our locked out changes to the remote GitHub repository. And - -49
-because the GitHub repository is password protected, - -50
-we have to specify our login and password. And of course, if you - -51
-pass the wrong password, GitHub is not going to let you in. So let's try again. - -52
-Let's try to get the password right this time. I'm going to specify again, - -53
-my login and my password. At this point, the push is successful and - -54
-my changes are actually pushed to the master, which is the GitHub repository. - -55
-To double check that, let's go back to the GitHub repository and as you can see, - -56
-that the file that we added, newFile, is there as expected. And of course, - -57
-there's many more things that you can do on the GitHub website, so - -58
-I strongly encourage you to go and try out things. But - -59
-the key message here is that the GitHub is a Git hosting website where you - -60
-can get an account and create your remote repositories. -- cgit 1.4.1