How to Clone Github Repository using Command Line?

By Hardik Savani April 21, 2022 Category : Git


This tutorial shows you how to create and clone github repository. We will look at example of github clone repository command line. This article goes in detailed on github create repository command line. In this article, we will implement a how to clone github repository in ubuntu. Alright, let’s dive into the steps.

In this tutorial, i will show you step by step how to create github repository and how to clone github repository using command line interface. you need to just follow below step to create your own github repository.

Let's follow bellow steps:

Step 1: Create Github Repository

In first step, you have to click below link for go to Github repository create page.

Create New Github Repository

You have to add project title and description there as below screen:

Then you have to hit "Create Repository" button.

Step 2: Clone Github Repository

Here, You can get clone repository path from bellow screen shot:

Then just paste with git clone command as below:

git clone

Step 3: Push Code First Time

After clone repository, you can make your first commit and push code on github. so let's create new file call "index.html" and write something on that file. if you are using ubuntu then run below command to create file.

nano index.html

Now, you can check what you made changes using git status command:

git status

Next, let's commit and push it to github.

git add .

git commit -m "First Commit"

git push origin main

Now, you can see on github repository, It will added file with commit:

That's it, You made your first commit.

I hope it can help you...

Tags :