Skip to content
Related Articles

Related Articles

Git – Environment Setup

Improve Article
Save Article
  • Last Updated : 09 Mar, 2022
Improve Article
Save Article

Git is an open-source, distributed version control system used to track and manage changes within a code repository. It was developed by Linus Torvalds in 2005. Before using Git, we have to install and set it up for our use. Here is how it goes.

Installation

Step 1. Go to git-scm.com/downloads and download as per your system.

git-scm/download webpage

git-scm/download webpage

Step 2. If you are using Debian-based GNU/Linux distribution, all you have to do is command sudo apt-get install git-core.

Step 3. Whatever command line you are using, enter “git —version” if it gives back the Git version you are ready to go.

git version check

git version check

Setting Git Environment

Git has a git config tool, which allows us to set configuration variables. Git stores all the global configurations in a .gitconfig file, which is located in our home directory. To set these configuration values as global, add the –global option, and if you omit the –global option, then our configurations are specific for the current Git repository.

Setting username

This is for customizing our username, which will tell who is working on the repositories.

setting git username

setting git username

Setting email id

This is for setting our email, which makes our identity as a creator of the repositories.

Setting email id

Setting email id

List of Git config

To verify our Git settings of the local repository, use the git config –list command as given below.

List of Git config

List of Git config

My Personal Notes arrow_drop_up
Related Articles

Start Your Coding Journey Now!