What is Git Bash?
Git Bash for Windows is simply a package that includes both Git and Bash.
Git is an open-source version control system for tracking source code changes when developing software. It keeps a commit history that allows you to revert to a stable state in case you make errors in your code. Git also enables multiple developers to collaborate on the same code base.
Bash is a Unix command-line shell. The name is an acronym for Bourne-Again Shell. It comes with useful Unix commands like cat, ssh, SCP, etc., which are not usually found on Windows.
After completing this reading, you will be able to Install Git Bash to your Local Computer.
If you intend to run this lab on your system, please ensure you have the following:
- A Laptop or PC with Windows installed
- A Internet connection
Installing Git Bash for Windows
Estimated time: 10 minutes
To install Git Bash for Windows to your local system, complete the following steps:
1 - Go to the Git download image 1. Click Download [version number] for Windows, as shown in the following image:
You will be redirected to a new page and the download will start.
Note: If the download doesn't start, click Click here to download manually.
2 - Go to the folder where you saved the file and double-click to open it. Click Run to begin the installation.
3 - A GNU General Public License information window will open. Now Click Next to begin the installation.
4 - Select the location where you want to install Git Bash.
Note: It's recommended that you simply install to the default location. Click Next.
5 - Choose the components you want to install, or simply leave the default options selected. Click Next.
6 - You can change the name of the start menu folder or simply leave the default name Git as is. Click Next.
7 - Select the default editor for Git to use.
Note: You can use VIM, VSCode, etc. Just choose clicking the Dropdown Arrow to choose your preferred one. Click Next.
8 - Choose how you want to use Git from the command line. Click Next.
9 - Select Use the OpenSSL library. Click Next.
10 - Configure your line ending conversions for Windows by selecting the default option, Checkout Windows-style, commit Unix-style line endings. Click Next.
11 - Configure your terminal emulator to use with Git Bash by selecting the default option, Use MinTTY(the default terminal of MSYS2). Click Next.
12 - Configure the default behavior for a
git pull by selecting Default (fast-forward or merge). Click Next.
13 - Select any additional options you want to install. (The default option is sufficient to use Git Bash successfully.) Click Next.
14 - You can enable experimental options if you choose to. By enabling these options, you will be able to try newer features that are still being developed. However, you do not have to select any experimental options to use Git Bash. Click Install to complete the installation with the options you have chosen. The installation runs and when complete, a Completing the Git Setup Wizard window opens.
15 -Leave the checkboxes selected and click Next.
The Git Bash terminal opens. You are now able to enter Git and Bash commands.
Congratulations, you have now successfully installed and launched Git Bash for Windows.
Download this Git commands cheat sheet to have all Git commands in one place for future use.
Thanks for the read! Now go practice & build something awesome!