DEV Community

Cover image for Unleash the Power of Git: Installing Git Bash on Windows
Asadunnobie Ishaan
Asadunnobie Ishaan

Posted on

Unleash the Power of Git: Installing Git Bash on Windows

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

  1. Head over to the official Git for Windows.

  2. Choose the link that suits your requirements the most. Choose the 64-bit version unless you're specifically using a 32-bit Windows system.

  3. After the installment process, there should be a setup file in your designated directory.

Installing Git Bash

  1. Once downloaded, double-click the installer.exe file.

  2. Agree to the license terms and click "Next."

  3. You can accept the default installation location or choose a custom one. Click "Next."

  4. 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.

  5. 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.

  6. Click "Install" to begin the installation process.

Adding Git Bash to Your System Path

  1. Once the installation is complete, click "Finish."

  2. Type "Edit the system environment variable" and open it.

  3. Click on "Environment Variables" in the bottom right corner.

  4. In the "user variables" section, double-click on "path".

  5. On the top right, click on "New". A text input box should appear.

  6. 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.

  7. Click "OK" on all open windows to save your changes.

Verifying Installation and Path

  1. Open a new command prompt window (search for "cmd").

  2. 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.

  3. Alternatively, search for "Git Bash" in your start menu or search bar and open it. You should see the Git Bash prompt.

  4. 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 (2)

Some comments may only be visible to logged-in visitors. Sign in to view all comments.