Git Bash is the Bash terminal that comes with Git for Windows, so you get it by installing Git for Windows from git-scm.com or with winget install --id Git.Git -e --source winget. After installing, right-click any folder in File Explorer and choose the Git Bash option to open a terminal there.
Git for Windows describes Git Bash as "a BASH emulation used to run Git from the command line", which behaves like Git on Linux and UNIX systems. This page covers installing it, opening it, keeping it up to date, and fixing the problems the project's own FAQ lists. Version numbers and release dates are as of November 2026.
How to install Git Bash on Windows
Git Bash is not a separate download. It is one of the components of Git for Windows, which also includes Git GUI, Explorer shell integration and Git Credential Manager. The git-scm.com Windows page offers these downloads:
| Option | File or command |
|---|---|
| Installer, x64 | Git-2.56.0.4-64-bit.exe |
| Installer, ARM64 | Git-2.56.0.4-arm64.exe |
| Portable, x64 | PortableGit-2.56.0.4-64-bit.7z.exe |
| Portable, ARM64 | PortableGit-2.56.0.4-arm64.7z.exe |
| winget | winget install --id Git.Git -e --source winget |
| Chocolatey | choco install git |
The page lists 2.56.0(4), released 2026-10-26, as the latest version. It also warns that the winget and Chocolatey packages are not maintained by the Git for Windows project and might deviate from the latest official version. If you want the newest build, use the installer from the project.
Supported systems: the project FAQ says Git for Windows works with recent x64 Windows versions starting with Windows 8.1, and that support for Windows 7 and 8 ended with version 2.47.0 (2.46.2 was the last release for them).
How to open Git Bash
The project's home page gives one method: right-click a folder in Windows Explorer and pick the Bash entry. The shell opens in that folder.
To check that it works, run these in the new window:
git --version
pwd
ls
Example output (your version and path will differ):
git version 2.56.0.windows.4
/c/work/project
README.md src
Git Bash prints Windows drives in Unix style, so C:\work\project appears as /c/work/project.
Basic Git Bash commands to know
Git Bash uses Bash syntax, not Command Prompt syntax. The table maps the everyday ones.
| Task | Git Bash | Command Prompt |
|---|---|---|
| List files | ls | dir |
| Current folder | pwd | cd |
| Show a file | cat file.txt | type file.txt |
| Clear the screen | clear | cls |
| Delete a file | rm file.txt | del file.txt |
In Bash, a backslash escapes the next character instead of separating folders. Type paths with forward slashes, or wrap a Windows path in single quotes. Writing the scripts themselves is covered in Bash script basics.
How to update Git Bash
Because Git Bash is part of Git for Windows, you update them together. From the project FAQ, run:
git update-git-for-windows
Run git update-git-for-windows -h for help. You can instead download and run the new installer. The FAQ says customizations are kept if they are in the appropriate configuration folders. It also calls upgrading "highly advisable" if you have a version older than 2.56.0(4), because several releases fixed security-relevant vulnerabilities. Git for Windows usually follows a new Git release within a day, and Git ships a new major version about every 12 weeks.
Fix: a program hangs or prints garbage in Git Bash
The FAQ explains that Git Bash uses mintty, which does not present itself as a console to native Windows programs. That can corrupt non-ASCII output and break interactive or full-screen programs. Its workarounds:
- Run the program through the
winptyutility, for examplewinpty pythonin place ofpython. - Change the Git Bash shortcut to run
bashdirectly, without mintty, and set up the console host. - Install ConEmu.
Fix: "Permission denied (publickey)"
When SSH fails from Command Prompt or PowerShell but works in Git Bash, Windows is probably using a different ssh. The FAQ says to put Git's copy first on your PATH. In Command Prompt:
set PATH=C:\Program Files\Git\usr\bin;%PATH%
In PowerShell:
$Env:PATH = "C:\Program Files\Git\usr\bin;$Env:PATH"
It adds that you should also run the bundled start-ssh-agent.cmd in each new prompt, so SSH_AGENT_PID and SSH_AUTH_SOCK are set. For the full diagnosis of this error, see Fix Git "Permission denied (publickey)".
Fix: errors with long path names
The FAQ's answer is to set the core.longpaths configuration property to true:
git config --global core.longpaths true
The FAQ names the setting but does not print this command, so the exact form above is the standard git config syntax for a global setting.
Fix: the git-bash launcher uses the wrong language
The FAQ gives a launcher command that sets LANG before starting Git Bash. Replace en_GB with your locale and adjust the install path to match yours (the FAQ's example uses a Git for Windows SDK folder):
C:\Windows\System32\cmd.exe /c "set LANG=en_GB && start C:\git-sdk-64\git-bash.exe && exit"
Git Bash, WSL, or PowerShell?
Git Bash is a native Windows program that emulates Bash, so it is quick to install and does not need virtualization. WSL runs real Linux and suits Linux-only tools; setup is in how to install WSL on Windows. If you want Git Bash inside an editor, see the VS Code terminal guide.
If Git warns about line endings the first time you commit from Windows, that is a separate setting. See LF will be replaced by CRLF.
Frequently asked questions
- Is Git Bash the same as Git?
- No. Git is the version control program. Git Bash is a Bash shell that ships with Git for Windows so you can run Git and Unix-style commands from a terminal. You can also run Git from Command Prompt or PowerShell if Git is on your PATH.
- How do I update Git Bash?
- Git Bash updates with Git for Windows. Run git update-git-for-windows in Git Bash to check for a newer release, or download and run the new installer. According to the project FAQ, customizations stored in the usual configuration folders are kept.
- Is there a portable version of Git Bash?
- Yes. The Git for Windows download page offers a portable edition (a self-extracting .7z.exe file) for both x64 and ARM64. It needs no installer, so it can run from a folder or a USB drive.
- Do I need Git Bash if I use WSL?
- No. WSL gives you a real Linux environment, and Git Bash is a lighter Bash emulation that runs natively on Windows. Choose Git Bash if you only want Git and basic Unix commands without installing Linux.