Open In App
Related Articles

Git – Environment Setup

Improve Article
Improve
Save Article
Save
Like Article
Like

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

Whether you're preparing for your first job interview or aiming to upskill in this ever-evolving tech landscape, GeeksforGeeks Courses are your key to success. We provide top-quality content at affordable prices, all geared towards accelerating your growth in a time-bound manner. Join the millions we've already empowered, and we're here to do the same for you. Don't miss out - check it out now!

Last Updated : 09 Mar, 2022
Like Article
Save Article
Previous
Next
Similar Reads
Complete Tutorials