Downloads for Mac OS X, Windows, Linux and Solaris can be found on the official web of git - downloads. Instructions to install Git for Linux, Mac and Windows, using these downloads, are described on the Atlassian Documentation - Set up Git.
For Debian/Ubunto distribution, use the next command to install Git:
sudo apt-get install git
If your linux distributions is other, find distribution-specific instructions on Download for Linux and Unix.
Finally, you can check if Git has been installed with:
which git
# /usr/bin/git
- Download Git installer for Windows installer package.
- Run the installer.
- Select the location of the installation and proceed.
- Select Use Git from Bash only.
- Select Checkout Windows-style, commit Unix-style line ending.
- Select Use MinTTY
- Select Enable ...
- Open Git bash on Programs directory to open a command window.
Note: If java is not recognized when typing java
or javac
, copy the address where binaries of java and javac are found (Program Files >> Java >> jdk >> bin) on:
windows >> control panel >> System and Security >> System >> Advanced System Settings >> Advanced >> Environment Variables >> Sytem variables >> Path
Do not forget to use semicolom to add the path.
Open Git bash again and type java
. It should be recognized now.
Check if Git is installed on your system.
git --version
# git version 2.1.4
The easiest is probably to install the Xcode Command Line Tools. On Mavericks (10.9) or above you can do this simply by trying to run git from the Terminal the very first time. If you don’t have it installed already, it will prompt you to install it. Install git on mac
Installing Git through Xcode: Install Xcode
- Launch the App Store, then download "Xcode".
- Install Xcode, run it and go to Xcode’s preference via shortcut key
command
+,
. - Go to the Downloads tab, look for "Command Line Tools", and click Install.
- Quit and re-open Terminal, hit the git command and see if it has been successfully reinstated.
Manual installation of Git: set-up-git.
- Download the Git installer from git - download - mac. The installer is a DMG file.
- Double-click the DMG to expand it.
- Double-click the PKG file to install it.
- The Git installer launches.
- Follow the prompts to install Git.
- Open a terminal on your system.
- Verify the installation was successful by typing which
git --version
at the command line.