Difference between revisions of "Git"

From Organic Design wiki
(Free GIT Servers: typo)
(More details)
Line 2: Line 2:
  
 
Git's design was inspired by [[w:BitKeeper|BitKeeper]] and [[w:Monotone (software)|Monotone]]. Git was originally designed only as a low-level engine that others could use to write front ends such as [[w:Cogito (software)|Cogito]] or StGIT. However, the core Git project has since become a complete revision control system that is usable directly. Several high-profile software projects now use Git for revision control, most notably the [[w:Linux kernel|Linux kernel]], [[w:X.org Server|X.org Server]], [[w:One Laptop per Child|One Laptop per Child]] (OLPC) core development, and the [[w:Ruby on Rails|Ruby on Rails]] web framework.
 
Git's design was inspired by [[w:BitKeeper|BitKeeper]] and [[w:Monotone (software)|Monotone]]. Git was originally designed only as a low-level engine that others could use to write front ends such as [[w:Cogito (software)|Cogito]] or StGIT. However, the core Git project has since become a complete revision control system that is usable directly. Several high-profile software projects now use Git for revision control, most notably the [[w:Linux kernel|Linux kernel]], [[w:X.org Server|X.org Server]], [[w:One Laptop per Child|One Laptop per Child]] (OLPC) core development, and the [[w:Ruby on Rails|Ruby on Rails]] web framework.
 +
 +
Git differs from systems such as CVS, or SVN in that the database is maintained beside the working filesystem on peers. Each peer is easily sync'ed to any other
 +
by using push/pull or fetch. In subversion you use three main directory structures;
 +
*trunk
 +
*branch
 +
*tag
 +
 +
In git the trunk is equivalent to '''HEAD''', and is a sha1sum to the latest commit. Branches are used to fork development from the '''HEAD''' if for example bug fixing is required. A '''tag''' in git is just a named sha1sum commit which is effectilvely a static reference to a particular snapshot of code.
 +
 +
If a repository is cloned, git tracks the '''master''' which is the latest commit on the remote repository, as well as the '''origin/master''' which is the last '''known''' commit from the source sourced repository. This is updated if your remote changes are pushed back to the repository you cloned from.
  
 
We could use Git to maintain article revisions for the [[Extension:P2P.php|P2P MediaWiki Extension]].
 
We could use Git to maintain article revisions for the [[Extension:P2P.php|P2P MediaWiki Extension]].

Revision as of 04:54, 20 March 2011

Git is a distributed revision control / software code management project created by Linus Torvalds, initially for the Linux kernel development.

Git's design was inspired by BitKeeper and Monotone. Git was originally designed only as a low-level engine that others could use to write front ends such as Cogito or StGIT. However, the core Git project has since become a complete revision control system that is usable directly. Several high-profile software projects now use Git for revision control, most notably the Linux kernel, X.org Server, One Laptop per Child (OLPC) core development, and the Ruby on Rails web framework.

Git differs from systems such as CVS, or SVN in that the database is maintained beside the working filesystem on peers. Each peer is easily sync'ed to any other by using push/pull or fetch. In subversion you use three main directory structures;

  • trunk
  • branch
  • tag

In git the trunk is equivalent to HEAD, and is a sha1sum to the latest commit. Branches are used to fork development from the HEAD if for example bug fixing is required. A tag in git is just a named sha1sum commit which is effectilvely a static reference to a particular snapshot of code.

If a repository is cloned, git tracks the master which is the latest commit on the remote repository, as well as the origin/master which is the last known commit from the source sourced repository. This is updated if your remote changes are pushed back to the repository you cloned from.

We could use Git to maintain article revisions for the P2P MediaWiki Extension.

Git GUI

Git Gui is a Tcl/Tk based graphical user interface to Git. git-gui focuses on allowing users to make changes to their repository by making new commits, amending existing ones, creating branches, performing local merges, and fetching/pushing to remote repositories. Unlike gitk(1), git-gui focuses on commit generation and single file annotation, and does not show project history. It does however supply menu actions to start a gitk session from within git-gui.

Free GIT Servers

Github is the recognized centralized Git repository, but it is a pay site, so if you want your own free Git setup there are three ways:

  • Set up a bare Git server.
  • Install one of two free Github fork:
    • Gitolite is the up-and-comer and has a more decentralized approach
    • Gitosis has better documentation.
  • Gitolite is easier to implement and has P2P-like host features so is probably more suitable.

Links to Setting up Git Servers