layout | title | nav |
---|---|---|
default |
GIT Resources |
git-resources |
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.
In class, you have been introduced to git, GitHub and their use within the context of your project. This page will hold pointers to the introductory material and a listing of some git resources.
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:
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:
The Pro Git book is a concise discussion of git, how and why it works. The book is available freely online and licensed under CC BY-NC-SA 3.0.
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
- 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
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 tag
from Git Reference- Chapter 2.6 Git Basics - Tagging from the Pro Git book.
The 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:
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.name
and 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