Because of our work with the Linux kernel and with Android, we have started using Git more extensively at work, and my colleagues often have questions about how to get things done with Git. While the every-day command lists are helpful, most of the time, people would benefit more from getting a fundamental understanding of how git works. Here is a brief list of useful resources to help achieve that:
- Why Git is Better than X, where X is one of hg, bzr, svn, perforce. Also, why git can be more confusing.
- Git’s data model in a nutshell.
- Scott Chacon’s ProGit book is a good tutorial and reference.
- Scott Chacon’s Git screencasts, if you’re a visual learner.
- Like presentations? Slides from an MIT SIPB Understanding Git class [PDF, 1MB], if you’re in a hurry, or Getting Git from Scott Chacon if you’re not.
- Use Mark Lodato’s Visual Git Reference to help you understand how commands interact with history, the staging area and your working directory.
For me, the core difficulty is that people have to explicitly think about the history of their code and how they would like to share it with others. Git gives you many options whereas tools like Subversion and Perforce don’t; this plethora of options can make things confusing. In fact, it can lead to very philosophically different approaches for all aspects of your development process, ranging from shared-repository vs integrator to whether or not to merge frequently (yes? or no!). Here are a few useful readings on how people actually can use git:
- Oliver Steele’s Git Workflow and commit policies. Helpful for understanding how people use the index and remotes.
- Ryan Tomako has another way to use the index to help you split logically separate work into separate commits. Though some people don’t like the index.
Once you’re ready for more “tips”, be sure to follow:
- Junio Hamano’s blog. Junio is the maintainer of git and writes deep and useful technical posts.
- Scott Chacon’s ProGit blog. Scott has done more for advocacy of Git than anyone else.
- Git Ready; an inactive but very useful set of tips from Nick Quaranto.
For more regularly updated and possibly esoteric resources, check out my git bookmarks on delicious. Do you have some useful resources for getting people started with Git? Leave them in the comments.
Update: Added a link to the Visual Git Reference.