Git

From Uncyclopedia, the content-free encyclopedia
Jump to navigation Jump to search

“Git is CVS done right”

~ Linus Torvalds

Git is a source code management system with an emphasis on obscure technical terms.

History[edit]

“I'm an egotistical bastard, and I name all my projects after myself. Except git, which I named after BitKeeper's CEO”

~ Linus Torvalds

Although originally developed for Linux, git now has peerless Windows support via a one-click-installer that sets up a Gentoo virtual machine and git bash which pipes all the commands you type to it.

Command Line Interface[edit]

Advanced users can use shell commands to directly perform low level operations used internally by git's higher level commands, such as

git track -master \* HEAD -- myfile

which moves a file from the index into the cache without staging it, and

git track master \* HEAD -- myfile

which reformats your hard drive.

There are also shortcuts (known as porcelain) that do exactly the same thing as a git command, but in a simpler, less confusing way, e.g. hg init, hg add, etc.

Data structures[edit]

Git's on disc format.

The design of Git only permits non-empty lines to be tracked and nobody competent enough to make the change to allow empty lines has cared enough about this situation to remedy it. Developers are advised put in placeholder text to overcome this limitation, as in this example C++ code:

/* Hello World program */
// This line deliberately left blank
#include<stdio.h>
// This line deliberately left blank
main()
{
   printf("Hello World");
// This line deliberately left blank
}

As well as not tracking blank lines, git also doesn't track renaming of files. Infact, renaming files isn't supported at all;

git mv myfile myfile1

is simply a shortcut for

mv myfile myfile1
git add myfile1
git track master \* HEAD -- myfile

See also[edit]