How to Configure Git Repositiry on Linux


Git is a distributed revision control system  with an accentuation on speed, information uprightness, and backing for dispersed, non-straight work processes. Each Git working index is an undeniable storehouse with complete history and full form following abilities, free of organization access or a focal worker.

GitHub is a Web-based Git storehouse facilitating administration, which offers the entirety of the disseminated amendment control. In contrast to Git, which is completely an order line instrument, GitHub gives a Web-based graphical interface. GitHub is utilized for ‘variant control’. This implies that GitHub is utilized for programming improvement projects when more than a person(or a gathering) is chipping away at it. What GitHub does is that it makes a cloud-based concentrated archive for everybody working in the gathering and permits everybody dealing with the task to refresh the data. One can likewise utilize BitBucket, if not GitHub. 

In this post, We will install and configure git with git remote repository on ubuntu 20.04 LTS 

Step 1: Installing Git

You need to execute the given command to install the git packages on your ubuntu machine.

sudo apt-get install git -y

Step 2: Get your git repository URL

In my case, I am using my repository like this.

Step 3: Git Repository Configuration

You need to add your username and email id to configure git repository, Use the following command for the same.

git config –global "type_username_here"

git config –global "type_your_emailid_here"

Step 4: Create a Repository Directory

Now we need to make a directory with same named git repository, Execute the following command for the same.

mkdir myrepository


Step 5: Initiate Git Directory

You need to initiate the git, Use the following command for the same.

cd myrepository
git init


Step 6: Add Origin URL

Add your git repository url with git configuration in your local machine. 

git remote add origin

Step 7: Create and Add html files


Create a helloworld.html file using touch command and add it with git, Use the given command for the same.

touch helloworld.html
git add helloworld.html

Step 8 : Add Comment 

Add comment with file to track history, git command given below for the same.

git commit -m "your_message"

Step 9: Push the Code

Now we can push the code to the git remote server, Use the following command for the same.

git push origin master

How to Configure Git Repositiry on Linux

Leave a Reply

Your email address will not be published. Required fields are marked *

Scroll to top