Download for Windows
Click here to download the latest (2.42.0) 32-bit version of Git for Windows. This is the most recent maintained build. It was released about 1 month ago, on 2023-08-30.
Other Git for Windows downloads
Standalone Installer
32-bit Git for Windows Setup.
64-bit Git for Windows Setup.
Portable («thumbdrive edition»)
32-bit Git for Windows Portable.
64-bit Git for Windows Portable.
Using winget tool
Install winget tool if you don’t already have it, then type this command in command prompt or Powershell.
winget install --id Git.Git -e --source winget
The current source code release is version 2.42.0. If you want the newer version, you can build it from the source code.
Now What?
Now that you have downloaded Git, it’s time to start using it.
-
Read the Book
Dive into the Pro Git book and learn at your own pace.
-
Download a GUI
Several free and commercial GUI tools are available for the Windows platform.
-
Get Involved
A knowledgeable Git community is available to answer your questions.
You can get the latest setup of Git Bash by just managing this page. The software is absolutely free and available all over OS. Git Bash is a command line interface (CLI) tool that provides a Unix-like environment on Windows PCs. It allows you to use Git commands and perform various operations on your code repositories.
You can also get it from its official site
- Visit the official Git website: https://git-scm.com/.
- On the homepage, click on the “Download” button to go to the download page.
- On the download page, you will see options for different operating systems. Click on the download link for Windows.
- Once the download is complete, locate the installer file (e.g.,
Git-2.x.x.x-64-bit.exe
) and double-click on it to start the installation process. - Follow the installation wizard’s instructions, accepting the default settings unless you have specific preferences.
- On the “Select Components” screen, ensure that the “Git Bash Here” option is checked. This will add an option to open Git Bash from the context menu when you right-click on a folder in Windows Explorer.
- Continue with the installation, and once it’s complete, click on the “Finish” button.
After the installation, you can open Git Bash by following these steps:
- Open the folder or directory where you want to use Git Bash.
- Right-click inside the folder (or press Shift+Right-click) to open the context menu.
- From the context menu, select “Git Bash Here.” This will open a new Git Bash terminal window.
In the Git Bash terminal, you can use various Git commands to manage your repositories and perform tasks like cloning, committing changes, pushing to remote repositories, etc.
Note that Git Bash provides a command line interface, so you’ll need to be familiar with Git commands to make the most of it. You can refer to Git documentation or online resources to learn more about using Git commands effectively.
Git Bash is a package that includes the open-source version control system git and the Bash shell. It also comes packaged with a few additional commands that are useful for working on the Windows operating system. Download the installer from the Git website and run it. The installation wizard will ask you to confirm some settings and read the GNU General Public License.
Basics
Git Bash is a tool that allows Windows users to access command line features in the operating system. The tool also comes packaged with additional commands like cd which is used to change the current directory. The first step in installing Git Bash is to go to the official website and click the download link. Once the download has finished, open the executable file and follow the prompts to install the application.
During the installation, you can select which components to include in your Git Bash install, and you can also create a desktop shortcut for it. Once the installation is complete, you can begin executing Git commands.
Git is a version control system that has become one of the most popular tools for collaborative software development. It is a collection of command-line utility programs that are designed to run in a Unix-style environment. While Linux and macOS include built-in UNIX terminals, Microsoft Windows uses a different CLI called Command Prompt, which makes it difficult to use Git.
Installation
Git is a program that makes version control easier by tracking changes to files. While it is typically used on Unix-based systems such as Linux and Mac, Windows uses a different shell, so it requires an emulator to run Git commands. Git Bash for Windows installs a bash environment and some bash utilities to allow git commands to be used in a terminal.
The installation process is relatively straightforward. Click the download button on the Git Website and follow the instructions. This should include reading and agreeing to the license agreement.
The next step allows you to choose a text editor to use with Git (Notepad++ is recommended). The final installation step will let you adjust the PATH environment. This is the default set of directories included when running a command from the command line. Select the middle option and click Next. Once complete, you should see a Git Bash icon on your desktop and be able to launch it by right-clicking on any folder.
Configuration
During Git Bash Setup, you will be presented with a few options. Select the option that says On the desktop to create a shortcut to launch Git Bash on your Windows computer.
The next option relates to which SSH client Git should use. It is recommended to leave the default selection (OpenSSH) selected as this is the same default used for GitHub. The final option relates to how line endings are converted, it is also recommended to leave the default selected as changing this may cause problems.
Git Bash is an emulation of a bash shell environment that allows git to be used on a Windows machine. It includes bash commands and some other tools that are commonly used with git. Git Bash can be run from a terminal or by using a GUI like GitKraken Client. This combination gives you the power of a powerful Git command-line experience along with visualization features. It is useful to review basic Bash usage before using this emulation.
Usage
Git Bash for Windows allows users to access and run all of the core Git commands like git clone, git commit, git checkout, git push, etc. It also provides a Linux terminal experience that includes basic shell utilities like ls (list files) and cd (change directory).
Git is an open-source version control system for tracking changes in source code during software development. It enables software developers to collaborate on projects by keeping track of the history of revisions made to a set of files.
During the installation process, users can choose between several options to configure Git Bash for Windows. They can choose to “Use Git from Git Bash only” to only use Git commands within the Git Bash terminal. Alternatively, they can select “Git from Git Bash and also from 3rd-party software” to use both Git commands and the corresponding bash utilities on Windows Command Prompt and PowerShell.
Changes since Git for Windows v2.37.2(2) (August 11th 2022)
New Features
- Comes with Git v2.37.3.
- Comes with tig v2.5.7.
Bug Fixes
- Git for Windows now correctly handles
.doc
files that are not Word Documents.
Filename | SHA-256 |
---|---|
Git-2.37.3-64-bit.exe | b0442f1b8ea40b6f94ef9a611121d2c204f6aa7f29c54315d2ce59876c3d134e |
Git-2.37.3-32-bit.exe | 5cc8e503989f0a3b3a5529c19074b07d83d7a6bc163532efa577bddbddfe3da3 |
PortableGit-2.37.3-64-bit.7z.exe | ecd013c3aecdde0ffb363d5058d379a9c4037ff9ffbc004218632e288490f35c |
PortableGit-2.37.3-32-bit.7z.exe | fbb50b45117ee1ca559e353f19b9a903f08febba50bd88fb4c3c3ddf533f024c |
MinGit-2.37.3-64-bit.zip | cec8d038fadbdd82e269a5c458fd2a62711c1bb9a76c85f07c46de3bff6cdf32 |
MinGit-2.37.3-32-bit.zip | cac833cce9d71b96520418551c03e9dd377293da64a146f1603efb71ddc7771a |
MinGit-2.37.3-busybox-64-bit.zip | fca6336cb65687464869212606b1afa603b405af055521de3eb35cd414691a31 |
MinGit-2.37.3-busybox-32-bit.zip | 4553b4e93b9daf8903d52561f00afb740da7bad47504a0777bcd8ac0a741a85e |
Git-2.37.3-64-bit.tar.bz2 | 414d77223eaec06fe814df4973ef3af345c04fb04646b889eb7a2df4ea602e63 |
Git-2.37.3-32-bit.tar.bz2 | 4c3f5d2976d3c1804f32d2331ca26c6af30616babb2480baeb8856305ec2ec34 |
This article was written by a guest author.
Updated: 6/22/2022
Put simply, Git Bash is an application for Microsoft Windows OS environments that provides Unix based shell utilities and experience for Git command line commands. Git Bash emulates the Git command line experience that Unix environments have, for Windows users. Most Windows users download Git Bash when they first install Git for Windows.
As a version control system, Git was originally delivered within Unix style command line methods. MacOS & Linux Operating Systems have a built-in terminal shell that supports Unix-based command line features whereas Microsoft Windows’ Operating System command line prompt is not a Unix-based terminal.
Because the Windows command line does not support Unix-based commands, Git CLI features are mostly delivered with user-friendly GUI applications in the Windows Operating System.
These applications provide visual functionalities to the end-user which makes using Git easier. Even some of them, like GitKraken Client, provide drag-and-drop functionalities for common Git commands, so end-users don’t need to know every single command for managing their code base. This makes life easier for beginners at the very first stages of Git usage.
As Git experience increases, end-users can prefer using Git command line features for specific commands. Git Bash is one tool that provides command line features in the Windows Operating System to end-users. Another tool that developers can use to interact with the command line on Windows is GitKraken Client’s CLI.
Git Bash Topics Covered
Introduction to Git Bash
Git Bash Download
Using Git Bash with GitHub
Git Bash Commands
Set Git Bash as Your Default Terminal in GitKraken Client
Git Bash FAQ
“@GitKraken Client is one of the best graphical tools to keep track of your code. I used just Bash before. GitKraken Client simplified my life a lot!” – @elenaManele
Introduction to Git Bash
A shell is a computer application that integrates with the operating system and exposes its services to an end-user or other applications. Bash is an acronym for Bourne Again Shell, which is the GNU Project’s shell.
Git Bash is not just a bash package for Microsoft Windows OS. It includes bash utilities, Unix collections like Secure Shell Protocol (SSH), Secure Copy Protocol (SCP), CAT (Unix utility that reads files sequentially, writing them to standard output), and other Unix-based collections compiled for Windows and Git features.
Git Bash provides a package for Git usage from the command line for Windows users, but GitKraken Client will make those same actions faster and more intuitive.
Some things absent from Git Bash that users can enjoy in GitKraken Client are auto-suggest and auto-complete for Git commands. Just start typing a command in the terminal tab and you will see relevant command suggestions with descriptions. Simply select the command you’re looking for and hit enter to automagically complete the Git action!
GitKraken Client’s magical auto-complete and auto-suggest for Git commands will help you accelerate your keyboard-driven Git workflow and increase your productivity.
Git Bash can be installed as other Windows applications, but you need to first download the executable file from the Git Bash download page and then follow the installation steps.
1. Open your favorite browser and go to the Git Bash Download page on Git-scm.
2. After successfully downloading the Git Bash executable file, follow the installation steps described in the below embedded video. Some hints are also listed in the video for the related installation step.
3. Voilà! Git Bash is ready to be used on your local Microsoft Windows platform.
*If you used the above process to download Git Bash and Git for Windows for the first time, you may find instructions for configuring Git after your Git download useful. You’ll need to configure Git before you can access all of Git’s capabilities and features.
Using Git Bash with GitHub
In this section, we will look at how to run Git Bash and see some basic Git Bash commands required for Git integration. As Git Bash is a command line utility for Git on the Microsoft Windows platform, a basic Microsoft Windows command prompt (CMD) knowledge will be useful before getting started with Git Bash as they are very similar. If you do not know how to use CMD features, you can just take a look at the Windows Commands Reference from the Microsoft related web site.
Now, let’s look at an example of using Git Bash with GitHub. You will start by linking your GitHub account with Git Bash to start configuring your GitHub repositories. If you do not have a GitHub account, you can create one directly from the GitHub home page.
You can also refer to GitHub Docs for a very large and illustrative documentation about GitHub usage.
Git Bash Commands
Before going into steps on how to configure Git Bash and how to use it, you need to have a repository on GitHub. If this is your first time creating a repository on GitHub, checkout the related GitHub documentation for instructions on how to create a repository on GitHub.
Now, let’s start configuring Git Bash with your GitHub account from scratch (examples in this article will be given from my personal GitHub account).
1. First step is to run Git Bash. Double click the Git Bash icon on your Windows desktop to open your Git Bash interface.
2. Use the cd
Git bash command to change your active directory with your local repository workspace. cd
and chdir
in Windows CMD are aliases for setting the active directory.
Now your active directory is your local repository. You can validate your active directory with the pwd
command.
3. This step is related to configuring your GitHub email and GitHub username. Type the below commands to link your GitHub email & GitHub username.
git config --global user.name "%yourGitHubUserName%"
git config --global user.email "%yourGitHubUserEmail%
a. Now, you can clone the “git-bash-intro” repository to your local workspace. First, get the clone link from your GitHub repository as shown below:
b. Then, type the below command to clone your repository. You will use the clone link that you just copied from your GitHub repository.
git clone "%yourRepositoryCloneLink%"
There are two important tips while cloning the Git repository. First: if you create a private repository, you also need to have related GitHub permissions. In this Git Bash example, the git-bash-intro
repository was initialized as public. You can check the repository visibility section from GitHub Docs for more information about GitHub repository permissions.
Another helpful tip is that you may face the below error while cloning a repository:
fatal: could not create work tree dir 'git-bash-intro': permission denied
This error states that you do not start Git Bash with the required permission to execute changes on your local Microsoft Windows platform. You can run Git Bash as administrator to resolve.
4. Next, you will clone a repository to your local workspace to create a folder with the same name as your GitHub repository.
5. Add a new text file called “firstCommit.txt” in your git-bash-intro
local repository.
6. It is time to reflect your local changes to your remote GitHub repository. Here, you will need to run a set of commands to push changes to your remote git-bash-intro
repository.
git add .
git commit -m "first commit"
git push origin master
Now, let’s check what these Git bash commands mean:
- git add: This command adds content to the git index and updates the index with the local working tree. You can use “.” to add all working tree contents, or you can explicitly mention which content you want to add.
For instance; you can use “git add firstCommit.txt” in order to add just `firstCommit.txt` to the index.
For more details, you can visit the git-add documentation page on Git-scm.
- git commit: This command creates a new commit instance with the current content(s) of the index and with the log message describing the changes.
For more details, you can visit the Git Commit page in the GitKraken Learn Git center.
- git push: This command updates the remote refs with the local refs. In this example, we will update the master branch in our remote repository with our local changes.
For more details, you can visit the git-push documentation page on Git-scm.
- git pull: This command will pull all changes from a remote repository branch to your local repository branch.
For more details, you can watch the beginner Git tutorial video: What is Git Pull?.
7. Confirm the remote repository is in the GitHub account. Sure enough, the new file “firstCommit.txt” is there!
Now that you have received this Git Bash introduction, you can easily adopt these steps to your own projects as you integrate Git Bash with your GitHub account and use the Git version control system for your code base.
Alternatively, the process of integrating your command line terminal with Windows using GitKraken Client is much easier and takes far fewer steps. Simply download GitKraken Client on your Windows machine, open a new tab, and click New Terminal Tab. Then start typing your commands to get to work – seriously, it’s that easy!
Using GitHub with GitKraken Client
In comparison to using GitHub with Git Bash, in GitKraken Client, you can leverage the full power of the robust GitHub integration by simply signing into GitKraken Client using your GitHub credentials. From there, it’s just a few short steps to generate an SSH key and add to GitHub, and clone or fork a GitHub repository. Learn more about how developers use GitKraken Client with GitHub for a seamless Git workflow, including creating GitHub pull requests.
Set Git Bash as Your Default Terminal in GitKraken Client
Git Bash is a life saver for Windows users who want to leverage the power of the Git command line for their version control. It is easy to install Git Bash and start using it as stated throughout this article.
And even better, with GitKraken Client, you can combine the power of Git Bash with visualization tools—like the commit graph, diff view, file history and blame, to unlock even more productivity.
To use Git Bash as the default shell for GitKraken Client’s built in CLI, perform the following steps:
- Select Preferences, represented by the gear icon, from the top toolbar
- From the left navigation, select Terminal
- Select Default Terminal
- From the subsequent dropdown menu, select Git Bash
You’re all set! Enjoy the power of Git Bash and the convenience of powerful visualization features, combined into one luxurious tool: GitKraken Client.
Git Bash FAQ
Q: How to Paste into Git Bash?
To copy text in Git Bash, hold Shift and use the left/right arrows to select the desired text, and hit Enter. To paste into Git Bash, press Insert on your keyboard.
Q: How to Update Git Bash?
A: Updating Git Bash can be accomplished simply by updating Git for Windows. From a command line, run git update-git-for-windows
.
GitKraken Client has revolutionized Git! Get a keyboard-driven, Git-enhanced terminal experience with powerful visualizations like the commit graph to help you accelerate your workflow.
Introduction
In this tutorial you will install Git Bash on your Windows operating system. Git Bash is one of the most popular packages on Windows system. It comprises of git and bash. Git was created in 2005 by Linus Torvalds, and was built around a Unix-based system, such as the Linux operating system and MacOS. These operating systems have a built-in shell called bash that allows Git to run smoothly.
On the other hand, Windows is not a unix-based system and uses a different shell from bash, which git
doesn’t support out of the box. To bridge the gap, Git Bash was created. Git bash installs both git
and bash
shell on a Windows system giving it access to command line tools that allow git
to run properly. Additionally, git bash also installs bash
tools such as ssh
, cat
, nano
that makes developing on Windows easier.
What is Git?
Git is an open-source version control system for tracking source code changes when developing software. It keeps a commit history which allows you to revert to a stable state in case you mess up your code. Another common use for git
is collaboration. git
also allows multiple developers to collaborate on the same code base. it tracks all the changes each developer has made, and once the changes are accepted, the changes are merged into one code base which is deployed in production.
What is Bash?
Bash is a Unix command-line shell. The name is an acronym for the ‘Bourne-Again Shell’. A shell is a command line interpreter that gives the user an interface to interact with the computer through the use of commands.
Bash has a lot of useful commands, such as rsync
,ssh
, SCP
, etc., which are not available on windows by default.
Now that you have an idea of that git bash and the tools it installs on Windows, you will download git bash in the next section.
Prerequisites
To follow this tutorial you will need:
- Windows administrator privileges.
- A text editor. You can download Visual Studio Code or Notepad++.
Step 1: Downloading Git Bash
In this section, you will download Git Bash executable from the official website.
Open your preferred browser and visit Git Bash downloads page by clicking the following link: Git Download Page
Once the page loads, click the Download for Windows button.
Next, you will be redirected to a different page and download will start automatically in a few seconds.
Tip: If the download doesn’t start, click on the click here to download manually link.
Now that you have downloaded the Git Bash executable, you will run the installer.
Step 2: Running the Installer
In this step you will start the Git Bash installation wizard. Go into your Downloads directory or the location where your browser download things in. Click the Git Bash executable(.exe file) to run the installer.
Windows will prompt you with the message «Do you want to allow this app to make changes to your device?», click Yes.
Next, read the GNU General Public License and click Next.
Step 3: Selecting the Destination Location
In this step, the installer will ask you select the location you want to install Git Bash. Proceed with the default option, and click Next.
Step 4: Selecting Components
Select the components you want to install. I prefer selecting the Additional icons component which creates a Git Bash shortcut on the desktop. After you’ve selected the components, click Next.
The installer will ask you to choose the folder to create Start Menu folder. Proceed with the default name by clicking Next.
Step 6: Choosing the Default Editor for Git
In this step, the installer will ask you to choose the default editor for Git. By default it chooses Vim, please don’t proceed with the Vim editor as it has a steep learning curve.
Instead, choose a text editor that you like. If you looking for recommendations, you can download Visual studio code or notepad++ which are much easier to use and restart the installation wizard.
I prefer Visual Studio code, so I will select that.
After choosing the editor, click Next.
Step 7: Adjusting the Name of the Initial Branch in New Repositories.
The installer will now ask you to choose the branch name for new repositories. Naming a branch master used to be a popular naming convection, but lately there has been a shift to naming branches main. This due to negative association with the word master. Even GitHub changed the default branch name from master to a more inclusive name main.
So in this step, we will name the branch name main. select the Override the default branch name for new repositories option, and type main. After that, click Next.
Step 8: Adjusting your PATH Environment
In this section, the installer will ask you to choose how you want to use Git. It offers you the following options:
-
Use Git from Git Bash only: allows you to run Git and Bash commands in the Git Bash terminal only. The commands won’t work on Windows Command Line(CMD) or PowerShell.
-
Git from the command line and also from 3rd-party software(recommended): allows you to run Git commands only on CMD, PowerShell and when you need bash commands, you will need to open the Git Bash terminal.
-
Use Git and optional Unix tools from the Command Prompt: Allows you to run both Git and Bash commands on CMD or Powershell. This option overrides default CMD tools like find and sort.
We will go with the default option Git from the command line and also from 3rd-party software. We will be able to use Git on all terminals: CMD, PowerShell and Git Bash terminal. And we can always open the Git Bash Terminal when we need more bash tools. Click Next to proceed.
Step 9: Choosing the SSH executable
Select the Secure Shell(SSH) client, it’s recommended to go with the default option. So select Use bundled OpenSSH, and click Next.
Step 10: Choosing HTTPS Transport Backend
The installer will ask you to choose the SSL/TLS library for Git HTTPS connections. Proceed with the default option Use the OpenSSL library and click Next.
Step 11: Configuring the Line Ending Conversions
In this step, you will be prompted to choose how Git should treat line endings in text files. Since you are on Windows system, go with the default option Checkout Windows-Style, commit Unix-style line endings and click Next.
Step 12: Configuring the Terminal Emulator to use with Git Bash
Choose the terminal emulator you want Git Bash to use. MinTTY works well, so I would recommend you to proceed with the default option Use MinTTY(the default terminal of MSYS2) and click Next.
Step 13: Choosing the Default Behaviour of git pull
In this step, the installer asks you if you want to change the default behaviour of git pull
(a git command). Unless you know what you doing, proceed with the default option Default (fast-forward or merge) and click Next.
Step 14: Choosing a Credential Manager
In this step, you will be asked to choose a credential manager. Proceed with the default option Git Credential Manager Core and click Next.
Select the features you want. I find the default options sufficient for my needs. You can proceed with them and click Next.
Step 16: Configuring Experimental Options
If you are feeling adventurous, you can try new experimental features. I like to play it safe and I don’t enable them, so I will proceed to start the installation process by clicking Install.
Step 17: Waiting for Git Bash to install
In this step, you take a step back and wait for a few minutes for the Setup Wizard to install Git Bash on your computer.
Step 18: Completing the Installation
After the installation has finished, select Launch Git Bash and click Finish to launch Git Bash.
The Git Bash terminal will now open and you will be able to enter Git and Bash commands.
Congratulations on successfully installing Git Bash.
Step 19: Launching Git Bash
The following are just some tips on how you can easily launch Git Bash.
1. Right-click on any folder, anywhere and it will have the launch Git Bash option on the context menu.
2. If you enabled the «Additional icons» option on Step 4, you can easily launch Git Bash by clicking the Git Bash desktop icon.
As mentioned in Step 7, you will be able to run Git commands on Git bash terminal, Windows Command Prompt, and Powershell.
Quickly, lets verify that Git works on CMD and PowerShell by typing the following commands:
- git --version
git --version
tells you the Git version currently installed on your system.
Conclusion
In this article you installed Git Bash on your windows system. You also verified that Git works on CMD
, and PowerShell
. You are now ready to start learning Git. Visit gittutorial — A tutorial introduction to Git to learn the basics.
Thanks for reading.