One of the real benefits of git is the ability to collaborate easily with others in a de-centralized manner across time and space. In this chapter we will experiment with a model that is appropriate for a small group of collegial collaborators. My dictionary (WordNet) defines “collegial” as “characterized by or having authority vested equally among colleagues,” which is precisely the situation we will simulate. So, in this chapter we will explore the scenario where a small group of equals works on a writing project, on the assumption that everyone in the group is trusted to make any sort of change at any time.
We will not be using email attachments or Google Docs to communicate. Rather, an easy way to collaborate with git is to place a copy of the repository on a server where each collaborator has the right privileges to interact with the repository. If your project is secret and sensitive, this might be a server at your workplace, or a web host you control and trust. Or maybe the project is not so sensitive and a private account at GitHub is appropriate and easy to set-up. Or maybe your project has an open license and an open repository will eventually allow total strangers to contribute to your project (see Chapter 4). For exercises in this chapter, we will use GitHub, a (free) site that hosts git repositories along with tools supporting collaboration around a git repository.
There is just one more general git concept left, the pull request, so continue on to Chapter 4 to see how to open up your collaborations to the long tail of contributors from the entire world.