Chapter 18. Working with GitHub

 

GitHub (http://github.com) is the Git project-hosting website that has done much to increase Git’s popularity. GitHub takes advantage of Git’s distributed architecture, but offers additional project management and collaboration features. These features include wiki documentation, issue tracking, and basic collaboration management. GitHub’s social coding features have made it a popular platform for hosting and sharing code.

In this chapter, you’ll create a project on GitHub. I’ll relate GitHub repos to our earlier git clone exercises. You’ll then practice the two important GitHub features for collaboration: forks and pull requests. These two features take the standard git diff and git push/pull commands and add a bit more formality. Developers must understand forks and pull requests in order to collaborate on GitHub, as GitHub encourages this mode of collaboration.

18.1. Understanding GitHub basics

In chapter 11, you created a small set of Git repositories based on the math repository. The set of repos looks like figure 18.1.

Figure 18.1. A set of Git repositories

In figure 18.1, the folder in the bottom row (math.clone, math.bob, math.carol) are cloned from the folder at the top (math.git). The folders on the bottom are clones of the main repository, math.git. All the clones can perform a git push to and a git pull from this main repository.

18.2. Working with forks

18.3. Collaborating with pull requests

18.4. Lab

18.5. Further exploration

18.6. Commands in this chapter