Install and Configure Git on Linux and Windows

ยท

3 min read

Install and Configure Git on Linux and Windows

A Little About Git

in simple words, Git is a software that keeps a record of changes you have made in your file and can always undo those changes whenever you want (obviously not by Ctrl + z) and can also see who has made changes in the file

It is used majorly by developers to maintain their projects but non-developer can also use it. For non-developers, my father will write a blog on how git saves his meeting ๐Ÿ˜‚

Now back to the topic

Steps to Download Git on Windows and Ubuntu

  • Very Basic, Search git on your favorite search engine (mine google, and Duckduckgo), then click on Downloads

brave_942F8gT05E.png

Now you will see something like this depending on your OS

on Windows

brave_9XzAcwhTa5.png

on Ubuntu

Screenshot from 2022-01-16 15-46-12.png

  • Click on Download shown on monitor like image

On Windows, click on 'Click here to download it will download the complete setup

brave_zrrep6iJYi.png

On Ubuntu, these commands will help you to install git. so for this open your terminal by using Application Menu or Ctrl + Alt + T

Screenshot from 2022-01-16 15-46-29.png

Let's First Discuss how to install it on Ubuntu because its shorter than on Windows

Installing Git on Ubuntu

You just have to follow the commands mentioned above to install git

I hope you have opened your terminal

  • Enter git --version to see if it is already installed or not, if not then you will see something like this

Screenshot from 2022-01-16 15-51-33.png

  • Now, Use sudo add-apt-repository ppa:git-core/ppa and press enter to continue

Screenshot from 2022-01-16 15-52-55.png

  • After that, use sudo apt update

Screenshot from 2022-01-16 15-52-01.png

  • Now the final one, sudo apt install git and press y and just relax and wait for its completion.

Screenshot from 2022-01-16 15-54-01.png

Now check again git --version and you will see this

Screenshot from 2022-01-16 15-55-12.png

Now head to configure a part

Installing Git on Windows

It's not that hard to install, although you see a lot of options to check or uncheck but you don't need to worry. You just have to click on 'next' multiple times without changing anything

I am gonna show you some screen images that you will encounter while installing so if you wanna see them for reference you can or you can just skip them and jump to configure part

[NOTE: If you are a beginner then just follow the steps and don't change anything but if you are experienced and reinstalling git, you can change the options ]

Git-2.34.1-64-bit.tmp_XqwLgn5iIX.png

Git-2.34.1-64-bit.tmp_bWB16tJeXi.png

Git-2.34.1-64-bit.tmp_1OHekeVeYz.png

Git-2.34.1-64-bit.tmp_dA25EnI5a7.png

Git-2.34.1-64-bit.tmp_4CrYcbniGZ.png

Git-2.34.1-64-bit.tmp_iGkij2FAIv.png

Git-2.34.1-64-bit.tmp_LzinZ2dXyh.png

Git-2.34.1-64-bit.tmp_blfsxaygi4.png

Git-2.34.1-64-bit.tmp_T5N61VH55p.png

Git-2.34.1-64-bit.tmp_ZmaXKGhDz1.png

Git-2.34.1-64-bit.tmp_shre51MGwE.png

Git-2.34.1-64-bit.tmp_OXtZQUCfLa.png

Git-2.34.1-64-bit.tmp_kY8u20nSsA.png

Git-2.34.1-64-bit.tmp_5bnCnBTema.png

Git-2.34.1-64-bit.tmp_KhLXWhqqAq.png

Configure Git on Both Windows and Ubuntu

On Windows you will use the commands in git bash just right-click in any folder or on your desktop and select Open in Git Bash

rxqBU4S28z.png

mintty_u7LlxA6UsJ.png

On Ubuntu, you can just use your Terminal

Configure Git

The configure part is the same for both the OS

  • let's set the username which will be used to determine that you have made the commit. For this use the command git config --global user.name your_username In the place of your_username enter your username which you use in your GitHub account

  • now set your email which is your GitHub account email use git config --global user.email your_email In place of your_email enter your email

On Ubuntu

Screenshot from 2022-01-16 15-59-48.png

On Windows

mintty_7bObBu2tGs.png

To check whether you have entered the correct username or email use the following commands:

git config --global user.name

git config --global user.email

On Ubuntu

Screenshot from 2022-01-16 16-00-20.png

On Windows

mintty_1ACVZg0pDY.png

This is my First Blog Hope This Blog Helped you ๐Ÿ˜„

Now for more blogs like this follow me on Hashnode and other social media handles

Hashnode: https://hashnode.com/@vilgad

Twitter: https://twitter.com/vilgad_

Github: https://github.com/vilgad

ย