Installation

From Git SCM Wiki
Jump to: navigation, search

Installation Help

Installing Git

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 msysGit. Git can be obtained as well by using the Cygwin system and installing Git from within Cygwin. More info at CygwinBinaryInstall. If you would like to help develop Git on windows you need to install the Git Development Environment for Windows. Running Git on Windows is working already, but it is recommended only to users who can fix issues themselves, because there are not enough developers in that project yet to take care of all issues. This CopSSH and msysgit bundle is useful for allowing remote access to your repository on 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.

Debian / Ubuntu

If you want to build deb packages from upstream Git sources yourself (because the official debs are too old or you want to try some patch, whatever), you could try: http://repo.or.cz/w/gitcj-debian.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