[Other doc versions]
[Doc downloads (PDF, HTML, XML)]
[Security vulnerability CVE-2014-9390] If you are running a Git client older than 1.8.5.6, 1.9.5, 2.0.5, 2.1.4 or 2.2.1 (all released ), you should upgrade your client as soon as possible.
Stash servers are unaffected by this vulnerability.
This page describes how to:
The information on this page applies to installing or upgrading Git on either your local machine, or on the Stash server.
The versions of Git supported by Stash are listed on Supported platforms.
You can check your current version of Git by running the git --version
command in a terminal (Linux, Mac OS X) or command prompt (Windows).
For example:
git --version git version 2.2.1
If you don't see a supported version of Git, you'll need to either upgrade Git or perform a fresh install, as described below.
Use your package manager to install Git. For example, on Ubuntu 13.10, use:
sudo apt-get install git
If you are using a different Linux distribution, you may need to use a different package repository to get the latest stable version of Git. Alternatively, download the latest stable Git release from the Git website. If you need the most recent version of git, you might need to install it from source.
Now check the Git version – you should see the new version of Git.
If you still can't see the Git version, you may need to add the Git install location to your path. Open your ~/.profile
file in a text editor and add this line, where <path/to/git>
is the install location for Git:
export PATH=$PATH:<path/to/git>
You can use the which git
command to find the install location for Git.
Download the latest stable Git release from the Git website. Click on the downloaded .dmg file, then double-click the .pkg icon to run the installer. This will install the new version of Git over the existing version:
Now check the Git version – you should see the new version of Git.
If you still can't see the Git version, you may need to add the Git install location to your path. Open your ~/.profile
file in a text editor and add this line, where <path/to/git>
is the install location for Git:
export PATH=$PATH:<path/to/git>
You can use the which git
command to find the install location for Git.
Download the Full installer for official Git for Windows. Installing Git for Windows (msysGit) also installs a supported version of Perl.
msysGit is the only supported distribution when running Stash on Windows. Cygwin Git is not supported and has known issues.
Run the Git installer, ensuring that you install into the same location as any existing Git installation. You can use where git
to locate existing installations.
Ensure that git.exe is available in the path:
Now, check the Git version – you should see the new version of Git.
If you've been installing or upgrading Git for the Stash server, rather than for your local machine, you'll need to stop and restart Stash so that it will pick up the upgraded version of Git. See Starting and stopping Stash for details.