Git is a distributed version control system developed by Linus Torvalds to be used for the Linux kernel development. It quickly grew to be one of the most widely used source code management systems.
As with almost all technologies, there are two main ways to learn things: a formal introduction (takes more time) or a quick tutorial to get you going fast. Depending on what you prefer, here are some good places to start:
Formal Introduction to Git
If you are new to version control, or you want to get a lightweight overview before diving into the material, start with these set of short videos:
Git Magic is smartly written lightweight introduction git for CS students by Ben Lynn that is available for free under the GNU GPLv3 license. This book has a more practical approach and does not dive into concepts as much as Pro Git. The book is also available as a GitHub repository.
- GitHub's Try Git is an interactive introduction which is also part of Code School
- Git Immersion
- Learn.GitHub Video Tutorials
- git - the simple guide by Roger Dudler
- Tower Cheatsheet
- Cheatsheet by Roger Dudler
- git ready is a good place to find answers to very common questions
- Article by Abhijit Menon-Sen on git workflow in small teams
- Git Commit Policies by Oliver Steele
- Vincent Driessen developed a well reviewed and widely used workflow titled A successful Git branching model
Tips & Tricks
- When viewing a repository, you can hit "?" to bring up the list of available commands.
- This works in most GitHub pages, not only in code repositories
- Hitting "t", for example, will take your to the file finder
- Hitting the blame button, will take you line-by-line/commit-by-commit in a file to see who did what and enables you to blame a specific user for a certain code segment
Special Git Topics
git ignore files
Tags are alphanumeric names given to specific commits. Essentially, bookmarking that commit for easy identification and use. The submission notes discuss the use of tags in your project-based submissions. Here are some references discussing tags:
git log command is a very powerful command that helps you inspect the history of a repository. Here are some commonly used
git log variations:
Why My Account Is Not Linked/Showing in Commits and/or Graphs?
In order to configure git properly, you need to specify not only your name, but the email address you registered with in your git configuration.
In the GitHub Setup Guide, make sure you setup your
user.email properly. Your
user.email should either be:
- The same email you used to sign-up for GitHub; or
- Add that email to your Profile Email Settings
GitHub Help has a related question: https://help.github.com/articles/why-are-my-commits-linked-to-the-wrong-user