Git, the ubiquitous version control system, is an essential tool for developers of all stripes. While Git itself runs on the command line, on Windows, we use Git Bash, a Unix-like shell environment, to interact with it. This post will guide you through the straightforward process of installing Git Bash on your Windows machine and setting up your system path for easy access.
Downloading Git Setup for Windows
Head over to the official Git for Windows.
Choose the link that suits your requirements the most. Choose the 64-bit version unless you're specifically using a 32-bit Windows system.
After the installment process, there should be a setup file in your designated directory.
Installing Git Bash
Once downloaded, double-click the installer.exe file.
Agree to the license terms and click "Next."
You can accept the default installation location or choose a custom one. Click "Next."
Under "Use Git and/or Bash options," we recommend selecting all options except for "Checkout as admin." This ensures a smooth integration with your system. Click "Next" on each subsequent screen to accept the defaults for the remaining options.
IMPORTANT: During the installation, you'll see an option titled "Use Git Bash as your default shell for VC projects." We recommend unchecking this box. We'll configure Git Bash access differently in the next step.
Click "Install" to begin the installation process.
Adding Git Bash to Your System Path
Once the installation is complete, click "Finish."
Type "Edit the system environment variable" and open it.
Click on "Environment Variables" in the bottom right corner.
In the "user variables" section, double-click on "path".
On the top right, click on "New". A text input box should appear.
Write path to your Git Bash bin directory. The default location is typically
C:\Program Files\Git\bin
. Make sure to include the quotation marks if there are any spaces in the path.Click "OK" on all open windows to save your changes.
Verifying Installation and Path
Open a new command prompt window (search for "cmd").
Type
git --version
and press Enter. If Git Bash is installed correctly and added to your path, you should see the installed Git version information.Alternatively, search for "Git Bash" in your start menu or search bar and open it. You should see the Git Bash prompt.
Press
win + r
and write "bash". See if it opens the bash terminal
Congratulations! You've successfully installed Git Bash on your Windows machine and configured your system path for easy access. We are looking forward to hearing your thoughts.
Top comments (0)