Installation

From Git SCM Wiki
Jump to: navigation, search

OBSOLETE CONTENT

This wiki has been archived and the content is no longer updated. Please visit git-scm.com/doc for up-to-date documentation.

From sources

If you already have Git installed (many new Linux distributions come with Git), you can get the latest development version via Git itself by using the command:

git clone git://git.kernel.org/pub/scm/git/git.git
  • If you have problems connecting (Git uses port 9418), you can try to access the repository over the HTTP protocol (this method is considerably slower but works even behind firewalls and such):
git clone http://www.kernel.org/pub/scm/git/git.git

The main place to get Git is at http://www.kernel.org/pub/software/scm/git/. You can also use one of many kernel.org mirrors.

The latest install directions are included with Git under INSTALL and the most current version online is here.

Windows Systems

The most convenient choice is Git for Windows.

Others

OS X

Git for the OS X is installed by using the git-osx-installer but if you haven't got Leopard you're screwed because there aren't any install scripts and the source won't compile.

Alternatively, you can install Git via MacPorts or Fink. Both work with Tiger, but may pull in a couple of dependencies. With MacPorts, be sure to check out possible extra features with port variants git-core; for example, to install Git with bash completion use sudo port install git-core +bash_completion.

Another option for Git installation for users running OS X 10.5 or higher on an Intel machine is the Homebrew package manager. Installation is as simple as brew install git.

Ubuntu / Debian

Install precompiled:

sudo apt update
sudo apt install git

Getting and installing documentation

You can find all the plain text documentation in the Git source tree's Documentation/ directory.

In order to build the HTML version of the documentation you need to have AsciiDoc version 7.0 or greater installed. Man pages also require that xmlto is installed.

To build and install documentation from the Git source code simply run:

$ make install-doc

If you want to avoid having to install the documentation tools, autogenerated documentation is available in separate tarballs from:

beginning with the 1.4.0 version, as:

Also, many distributions bundle pregenerated documentation with either the git-core package or in a separate git-doc package.

If you already track development in the public Git project repository, you may also choose to fetch the autogenerated HTML and man pages from the html and man branches. Read INSTALL for more detailed documentation (at the end of the file). Once you have fetched the branches, you can use:

$ git tar-tree man > git-man.tar
$ git tar-tree html > git-html.tar

to easily extract the documentation.

For people on OS X (and on distributions that do not manage XML catalog files automatically), write-up by Steven Grimm may be helpful: http://article.gmane.org/gmane.comp.version-control.git/35565

Personal tools