How to connect github to you windows or linux computer.

How to install Git on Ubuntu 22.04

We have summed up for you all steps that will help in the successful installation of git on Ubuntu 22.04.

Step 1: Update the system

Before installing Git make sure your system is up to date. To verify this use the following commands.

$ sudo apt update

$ sudo apt upgrade -y

Now let’s upgrade the system.

Step 2: Install git

Now check if Git is already installed on the system or not.

git –version

As indicated in the output the git version is not installed on the system, therefore, now we will install by running the below-given command.

sudo apt install git

If you are using windows then install git bush software. Also you can continue using windows computer terminal

Step 3: Verify Installation

Now to verify the successful installation of git use this command once again.

git –version

Git has been successfully installed on Ubuntu 22.04.

Below we will brief you on how to set up a user account and make an empty repository using Git.

How to set up an account and repository

In order to make a user account on Git you have to provide a username and an email and this can be done using the following commands.

Step 1: Provide a username

Use the command given below to provide a username

git config –global user.name “INSERT YOUR NAME”

Step 2: Provide an email address

The email address is provided using this command.

git config –global user.email “INSERT YOUR EMAIL”

Step 3: Create a repository

Now the account has been set up, we will now generate a repository.

mkdir sample-directory -p

The directory has been created with success.

Step 4: Navigate to the directory

Now using the following command navigate to the newly-created directory.

cd sample-directory

Step 5: Initialize Git

After navigating to the directory, use the initialization command to create a hidden git directory that will store history, configuration, etc

git init

Step 6: List the content to verify

git clone https://github.com/arifbillah360/Glozzom.git

Let’s also test how to clone any github repository on our computer.

Leave a Reply

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