How to Download Git (for Different Operating Systems)-Part 2

Before starting, I suppose that you have already downloaded GPG, if you haven't check part 1 of the blog….

1. Download git for Windows system:

4. After installation, you will notice that there are multiple icons for git (Git bash, Git cmd, Git GUI) to know the differences.

5. Now, git should know you to work properly, HOW?? by configuring your name and email. To do this open Git bash, and run the following commands:

git config --global "Enter your Name"git config --global "Enter your email"

Note: make sure you enter the email of your GitHub account (if you want to use GitHub as the online host for your codes).

6. This step is only for GPG2 users. Git use GPG by default for the signing keys, to let it use GPG2 instead, run the following in Git bash:

git config --global gpg.program gpg2

7. As I discussed in the previous blog, that your name/email is not enough, and GPG key is required. To get the GPG key run the following command in the terminal (NOT Git bash): Write gpg2 instead of gpg, if you use GPG2

gpg --list-secret-keys --keyid-format LONG

This is what you’ll get:

Image source

The Short Key (shown above) is the GPG key ID, that will be used as a signing key in git, so copy that key, and run the following in Git bash:

git config user.signingkey YOUR-KEY-ID

You can use the below command instead, if you want to use the same signing key for all of your projects.

git config --global user.signingkey YOUR-KEY-ID

Now you’re ready to use the amazing features of git, Hurraaaaaay 😄

2. Download git for Linux and mac OS:

Git might be pre-installed, check the version to know

git --version

if it’s found, scroll down to the (configuration step).

** In Linux **

sudo apt updatesudo apt install git
sudo yum install git

** In mac **

brew install git

configuration step :

After installing git, you should identify yourself to git, by setting your name, email and signing key, to do this go back to the (Downloading git for Windows) and start from step 5. Here all the commands will be run in the terminal, unlike Windows.


To know other ways for downloading git, check 👉 atlassian-install-git

Self-taught data scientist | explain things related to (git, data science, ML) in a simple way.