Git

From eLinux.org
Revision as of 20:09, 23 August 2011 by Tim Bird (Talk | contribs)

Jump to: navigation, search

Git is a distributed Version Control System used heavily by the Linux Kernel Developer Community and many other open source projects,

Git is distributed: every developer has a copy of the whole project and its history, this doubles as backup as well as makes operations super fast since you don't need to go through network.

Git is about series of patches that work in a tree form, each tree leaf is a branch. Branches are easy and fast, you can create and delete as much as you wish and you can optionally push them upstream, so it's advised that development happens in your own tree and that you rebase your work on top of upstream 'master', that way you get a consistent sequence of patches to implement features. With Git you can go back in history and edit commits, delete them, reorder or even merge lots of commits into a single commit for publishing, usually required for projects that employ code review.


See Flameman/git and git usage for a Tutorial and examples

Additional Resources

Git Hosting

These sites provide (free) git hosting services:

Git tips and tricks

Here are a few tips and tricks about git:

* git has extremely cheap branching and merging
* git has relatively slow performance on 'git blame'
* You can see the history of a sub-area of a project, with a command like the following:
  * gitk v2.6.30.. kernel/debug
  * this shows only the commits since v2.6.30 (a tag), and only for the files under kernel/debug