Git is available for *nix operating systems, as well as MacOS and Windows.
Debian-based distributions (.deb)
Git is available on Debian, and derivatives like Ubuntu. It is currently packaged as
git. More recent packages of git are available from the Ubuntu Git Maintainers' PPA. You may also want to install some extended git functionality, for example git-svn, which allows two-way interoperability with Subversion, or git-email which provides utility functions for sending and receiving git data (primarily patches) via email.
$ sudo apt-get install git git-svn git-email
RPM-based distributions (.rpm)
Linux distributions using the RPM package format can use yum to get git:
$ sudo yum install git-core
$ sudo port install git-core
Additionally, those with Cygwin can use its setup to obtain Git.
Below is an example of how to compile git from source, change "git-184.108.40.206.tar.gz" to the version you downloaded:
mkdir ~/src cd ~/src wget http://kernel.org/pub/software/scm/git/git-220.127.116.11.tar.gz tar xzvf git-18.104.22.168.tar.gz cd git-22.214.171.124 make configure ./configure --prefix=/usr/local make sudo make install
Without the added
--prefix argument git will currently install to
~/bin. This may or may not be what you want, in most distributions
~/bin is not in the $PATH. Without the --prefix, you might have to explicitly state the path to the component programs on invocation, i.e.:
~/bin/git-add foobar. You can set
--prefix to whatever better suits your particular setup.
The source can additionally be acquired via git using:
$ git clone git://git.kernel.org/pub/scm/git/git.git
Or in the event you have problems with the default Git port of 9418:
$ git clone http://www.kernel.org/pub/scm/git/git.git
- ^ One effort to amend the lack of consistency through modern distributions and
~/bin, has been addressed by the Ubuntu developers which seeks to patch PAM, the authentication mechanism, to set up the environmental variable
$PATH. You can find more information out about this at https://bugs.launchpad.net/ubuntu/+source/pam/+bug/64064.
To avoid to reenter one's credential during each sync, register the account:
git config --global user.email "firstname.lastname@example.org" git config --global user.name "Michael Boudran"
To avoid the password in Linux, it's necessary to store it in plain text into:
With (ex: for github.com):
machine github.com login <user> password <password>
Other Git clients
Some integrated development environments like NetBeans also provide or complete Git client.
TortoiseGit allows to access to its Git commands by right-clicking on the concerned files and folders.