Installing Git Bash on Windows

DeCODE
DeCODE
7.6 هزار بار بازدید - پارسال - Subscribe ‪@decode786‬
Subscribe ‪@decode786‬
A full article is present at https://skillsuites.com/git-bash-on-w...

---
Git is a version control system. Git is a distributed system. On client machine you clone the entire git repository. This allows for multiple developers to work on same code.

What is Git Bash?

Bash is the name of a Linux program. We use it on Linux for different command to the Linux OS. On windows we have windows command line. Git bash provides us with the ability to run the git commands in Linux like environment. Git bash is a git client that connects us with a hosted git server online. Online Git services are available from Github, Bitbucket, GitLab, AWS Commit, Azure Repos and many more.

1: Download URL

We can download Git bash from the URL https://git-scm.com/downloads. We'll choose the Windows 64 bit installer version. The latest version at the time of writing this article is v2.39.2.

2: Launch the Installer

Once download is complete, run the installer by double clicking on installer file. In our case the name of executable is Git-2.39.2-64.bit.exe. The first step is agreeing to the software license.

Git Bash is an open source software. Therefore it is using GNU General Public License. GNU GPL is one of the available open source software distribution licenses.

3: Git Bash Installation Location

Next, we need to decide our desired installation location for Git Bash. My recommendation is to keep the default location. This makes it easier to find the installation directory later on. This also makes integration with other softwares smooth.

4: Git Bash Components

Next, we have the Git Bash optional components listed down. We'll select one option that is 'Additional Icons/On the Desktop'. This will create an icon for Git Bash on our desktop.

Git LFS provides support for large files. Lastly, .git* and .sh files are attached to the default Git Bash editor. We'll choose our default editor in next steps.

5: Git Bash Start Menu Folder

On this step, we can name our start menu folder for Git Bash. Or we can even choose not to create the start menu folder by selecting the checkbox in the bottom. We're leaving this to the default name Git.

6: The Default Editor Selection

This step provides us with the options to select an editor for our Git Bash. My recommendation is to use Notepad++. But, its a matter of choice for the end user. We have the flexibility to select an editor of our choice.

7: Initial Branch Name Configuration

Now a days the default branch is named as 'main' branch. This is the first branch created when we create a new repository. My recommendation is also to choose 'main' as the name of your initial branch.

8: Adding Git Bash to Path Environment Variable

Its better to have git added to your windows path environment. Having Git Bash in the Windows path allows us to run git commands from any directory in our Windows OS.

9: Git Bash SSH Config

In this step, we set our SSH executable for Git Bash. The first choice for using bundled OpenSSH seems reasonable. We can even choose an existing executable from our Windows OS.

10: Git Bash HTTPS Config

We have to choose HTTPS to keep our online communication secure. Here we're going with 'Use the OpenSSL library' as our default choice.

11: The Line Endings

The first option allows us to checkout with Windows line endings and commit back with Unix line endings. This is a great choice to avoid bugs due to line ending issues. A couple of other options are available for more advanced use cases.

12: Git Bash Terminal Emulator

The MinTTY emulator is our choice on this step for our Git Bash Terminal Emulator.

13: The Default Behavior for git pull

We can go with the default option on this step.

14: Git Bash Credential Helper

My recommendation here is to go with the default option. With this option we'll not need to re-enter the credentials again and again.

15: Git Bash Extra Options

Caching is always a performance booster and must be selected.

16: Git Bash Experimental Options

We will keep these options unchecked. As these are experimental options, their behavior is not guaranteed.

This is the last step. We can see the 'Install' button instead of 'Next' on this screen.

17: The Installation Execution

After hitting the 'Install' button on last screen, we enter the phase where actual installation starts. It takes about a few seconds to complete the installation.

18: Git Bash Installation Complete

The final screen of the Git Bash installation wizard shows the successful installation message. It also provides us with the options to launch the Git Bash and release notes by clicking the Finish button. If we don't want to launch either we can uncheck both the checkboxes and hit Finish.

19: Start the Shell

We can launch Git bash from start menu or desktop menu. The shell gives us the ability to run several Git commands.

Git Bash version can be determined using the command git -v or git --version.
پارسال در تاریخ 1401/11/27 منتشر شده است.
7,601 بـار بازدید شده
... بیشتر