Git Bash is a terminal emulator for Windows used for a Git command line experience. Using Git Bash, you can work on any changes in the code on the terminal itself, and you don’t need another coding environment such as Atom, Notepad++, etc.
Git is preinstalled on most Linux systems, but if you are using Windows, follow the next steps to install Git Bash on Windows 10.
How to Install Git Bash on Windows
While installing Git for Windows from the official download link is a breeze, one should carefully check the steps shown here to avoid syncing errors later. For Linux users, we have a beginners guide toward installing Git.
After downloading, select the components you want to install and clear the ones you don’t. Accept the GNI General public license as shown below.
At minimum, you will need to enable the options “Git Bash” and “Git GUI,” “enable Git support for large files,” “associate .git configuration files with the default text editor,, and “associate .sh files to be run with Bash.”
For Windows 10 users, a Git folder will be created as a default in “Program Files.” You can choose not to create a Start menu folder.
In the next step, you will also get a choice to select the default editor by Git. While Vim is the default editor, you will find many other options, such as Notepad++, Atom, Visual Studio Code, and Sublime Text. For this tutorial, we are using Vim.
Next, you will be asked what the name of the initial branch should be. It’s safer to add the name as “let Git decide.” To adjust the path environment, choose the recommended option of “Git from the command line and also from 3rd-party software.”
In the nest step, you have to choose the HTTPS transport backend. Use the OpenSSL library for superior authentication.
Another Git convention is line endings in text files. Choose “Checkout Windows-style, commit Unix-style line endings.”
Of course, you need a terminal emulator to use with Git Bash. Choose MinTTY, the default terminal of MSYS2, instead of your Windows 10 default console window. This will help you keep your Git operations separate from the remaining PC functions. Also, the MinTTY window feels exactly the same as the command terminal.
How should Git “Pull” requests be handled? Choose the default option here.
To manage your GitHub and other third-party credentials, choose “Git Credential Manager Core.”
There are some extra options to be configured. Choose “enable file system caching” for enhanced performance boost. There are also some experimental features in the next screen, such as pseudo consoles, which are safe to ignore.
It will take a few more minutes for Git to be installed on your machine.
Once the Git Setup Wizard has finished installing Git, you can launch Git Bash or open the program terminal from the Windows search box in “Administrator” mode.
Now that you have learned the steps to install the Git Bash terminal emulator on Windows 10 correctly, you can start experimenting with various Git functions, such as Git Aliases. We have also covered how you can get started with GitHub project management. You can further host your blog for free with Jekyll and GitHub Pages.