FREELessons: 24Length: 3.1 hours

Next lesson playing in 5 seconds

  • Overview
  • Transcript

5.2 Touring Github

So, now that we've created a GitHub account, and we've created a repository on our GitHub account, we're ready to start touring the repository tools that GitHub gives us. Here we are at And if we've logged into our GitHub account as we have here, you can see that we have our News Feed on the left side here. And since we aren't following anyone, and haven't made any actions ourselves, you'll see that there's no news here. But then over on the right side here, you'll see you have a list of Your Repositories. And down here is our project repository. So, I'm gonna click on that, and now here we are on that project repository page. So, let's tour around and see what we have here. Well, up at the top of every GitHub repository we have the username and the project name. That's pretty straightforward. Then here we have a button that would take us to the Admin panel for the project itself. Pull Requests, which we'll talk about shortly. And then we have an Unwatch and a Fork button. The Unwatch button says Unwatch because we are watching this repository because it is one of our own repositories. But let me open up another repository that is not one of our own repositories. This is the coffee-script repository. You can see here that, first of all, we don't have the Admin and Pull Request buttons, since this is not one of our own repositories. And also instead of Unwatch, it says Watch because we haven't yet chosen to watch this repository. I can click Watch here, and now the count of people watching this repository has gone up by one, and the button now says Unwatch. What does it mean to watch your repository? Well, let's head back here, open a new tab, and open up our GitHub homepage. And you can see down here it says this is a Watched Repository. So, watching is just a quick way to access repositories that are not your own, and keep tabs on what goes on with them. However, if we wanted to actually make a copy of the coffee-script repository, and make some changes of it ourselves, this is where we would use the Fork button. I'm gonna click Fork here, so we can see what happens when we decide to Fork a repository. As you can see, the repository is being forked. It's gonna take a few seconds, but then once it's done, we have our own coffee-script repository. As you can see, the sherlockTuts account has coffee-script repository. And notice this message down below, forked from jAshKanaz/coffee-script. So, now this is our own personal copy of the repository. If we head back here to the GitHub homepage, you can see down here on the right there is the coffee-script repository. Why would you wanna do this? Well, now that it's our own, we can actually clone this down to our computer, and we'll look at doing this shortly. It also gives us right access, so we can actually make changes to that repository on our own computer. Push those changes back up here to GitHhub, and then we can actually tell Jeremy Ashkenaz, hey, we've made some changes to the coffee-script project that you might want to integrate into your own master version of the project, check them out. And we'll look at the specifics of doing these things in another screencast or so. So, if we head back to our own repository, we can look at a few more things here. Now, we have a tab bar across the top here, we're currently on the Code tab, which gives us a list of the files and the directories that we have in our project down here. And we can click on any of these. For example if I click on the TODO file, you can see they were pulled off, and you can see the actual contents of the TODO file. In fact, we could even make some edits to this file, view just a raw version of the file. And this is useful if you want to actually just use curl or wget or something like that to pull down the single file to Git repository. You can just use the Raw view like that, or you can use some other Git things here. For example, we can look at the History of this file. What commits in the History of our project have actually made changes to this file. And you can actually browse deeper into the detail there. If we come back out here to our main project view, we have the description of our project that we made earlier. And we actually have a Read more link here, which will just pull us down here to the README. When you have a README file, GitHub actually puts the README down below the project so that any important information about the project is right there for everyone to see. Now, you might think it would be nice if GitHub converted this markdown into HTML, and it's not doing that because we don't have the markdown extension on our README file, so we're gonna add that shortly. But right now, let's come back up here to the top and look at this bar of tools right here. Clone In Mac is the next button. And this button here is gonna be useful when we start looking at some of the Git GUIs that are available. So, we'll come back to that. If you wanna download a given repository as a ZIP file, there's your button. And then next we have a bunch of different URLs. We can either have the SSH URL, the HTTP URL, or the Git Read-Only URL. And these the different URLs you would use to clone the project. Since this is our own repository, we have SSH access, which means that we can actually read and write if we clone from this repository. If we come back here to the coffee-script, you can see that we can only use HTTP or the Git protocol, but in Read-Only mode. So, these are a couple of different protocols that you can use, it really doesn't make too big of a difference which one you use. Down here we have a list of the current branches, of course we only have the master branch right now. We're on the Files, as you can see here, but I can click over here to view the different Commits that this project has. So you can see here, is an actual history of our Commits. And you might wonder, how did this picture get here? Well, this is because it's actually not thinking that we, the sherlockTuts user made the Commits that we've made so far. Because when I made those Commits I was actually using my own personal email address that I have for my own personal GitHub account. It recognizes that email address and pairs it up with my GitHub user account, and shows my GitHub avatar. So, this is a history of our Commits, and we could actually click any one of these Commits. And actually see graphically what the changes are. We can see this line was removed, this line was added. So there you go, we can come back here to Branches now, and you can see currently we only have one master branch. In a bigger project let's see, there's the coffee-script file, it's got a bunch of Branches, 14 Branches. So, let's look at its Branches. And you can see there's a lot more detail here. About what's going on, when they were last updated, who updated them, what the master branch is. And you can actually see how they differ from the master branch. See, here's the restrictDuplicateKeys branch is 2 Commits ahead of the master branch, 0 behind. Whereas the gh-pages branch is 4 Commits ahead of the master and 21 Commits behind, and we could actually compare some of these. So, if I actually click Compare there, let's see what we get. We actually have just basically a diff, showing us what has changed in that branch from the master branch. Let's come back to our own repository here, over here we have Tags which we haven't discussed yet, but we're gonna discuss Tags in a future video. They are similar to Branches, and this is where you'll see them. And then of course, there are Downloads. And right here, we can actually create some Uploads if we wanted to have some assets or resources, something like that. It's not actually part of the GitHub repository, GitHub actually allows us to upload some things. And as you can see you've got a little monitor here for your disk usage, so there's a limit to how much you can upload. But I could choose to choose a new file here I could upload something. And then, as you can see down here, this is where they would be listed. So, that is the main Code file here. If I move over here to Network, you'll see that since this is a basic project, there's really not much here. There's one user, and that user has committed a bunch of different Commits here. We can see that the author was Andrew Burgess. However, that's pretty straightforward. Let's come back to our coffee-script repository and check out the Network tab for the coffee-script repository. See if that gives us a little more of an active network graph. As you can see, we certainly have a lot more of an active graph with different Branches coming off here. As you can see, there are numerous people who actually have branched off and made their own repositories. We can just keep scrolling, and if I click and drag within this branch you can see it keeps going down where different people have done different things. And once you're working in a large repository where you have a large team of people or many different people working on the same repository, this kind of graph will be much more useful to you. But at this stage in your Git usage, having this big of a graph like this isn't going to be that big of a deal for you. In fact, most of the time, if you're just using GitHub personally, maybe with a few other people, it's gonna look a lot more like our graph here, but just know that GitHub gives you a lot of power for working with other people. We're gonna come back to the Pull Requests tab later. The Issues tab is almost like a little bug tracker, where people who have used your project can come create issues, you can comment back and forth on them, you can work on them, close them, etcetera. If I come over here to the coffee-script Issues, you can see that it has 243 Issues. And we have different things here. For example, the 'else' binds to wrong 'if/switch' statement, this is a bug and a question. Add support for assertions, this is an enhancement request, and so you can see different things here. If I, let's go into this one, Add support for assertions, you can see that this guy has made his case here, and then different people have been able to comment it just like this. And it's can be a discussion about how the project might be brought forward. So again, not something specifically related to Git, but just something that github gives you to make the whole project management thing a lot simpler. On the Wiki Page, github again, just to make it easier, allows you to create a whole Wiki for your project. So, you can create New Pages, Edit Pages, etcetera. And as you can see, we've got a whole list of pages here in the CoffeeScript Wiki. Finally, GitHub gives us a bunch of Graphs, that again, just make it easier to manage your project. You can see how Code has been added, what Commits have been made, who's been most active on the project, different things like that. When Commits are being made most often. So, really a whole lot of tools that are really, really useful if you're working with a lot of people. However GitHub of course, is useful if you just want to store some code, share some simpler projects, and so that's what we're going to be doing with it as you've seen. Of course, even though GitHub gives us all these power, there's still just the basic actual Git commands that we use to interact with GitHub. All of this GitHub stuff is very useful, but it's not actually Git related. It's more project management related as you've seen. So in the next couple of screencasts as we're working with Git and Github, just remember that these Git tools that we're kind of actually typing into our command line. They work with GitHub of course, but they were also work with any other hosted Git service. Or even if you just have a Git repository on a server of your own, or on another computer that you can access via SSH. In that way, GitHub is no different than anything else. Before we close up this video, I want to check out the project Admin page, and this just gives us some basic stuff, allowing us to Rename a repository, change the Default Branch. We could turn off the Wikis and Issues feature if we wanted to. We could do some specific things with Collaborators, Service Hooks, and Deployment Keys. Service Hooks is something neat that you might find useful to look at as you get into using Git more. A Service Hook basically allows you to share your Commits with other applications. And as you can see in their little example photo here, they have a Commit being made on the command line, and then not actually showing up in Campfire. It's useful in that way if you use any of these online services listed here. You can make building your project a whole lot simpler just by adding one of these Service Hooks, and making Git and GitHub do more of the work for you to make your job a whole lot easier. So, there you go. That's a whirlwind tour of GitHub and the different features that it gives you for working with your repositories. We're gonna dive back into the actual Git commands now, and look at how we can actually move our code back and forth from our own computer to GitHub.

Back to the top