How to Clone Github Repository using Command Line?
Hi,
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.
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 git@github.com:savanihd/Git-Project.git
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...
Hardik Savani
I'm a full-stack developer, entrepreneur and owner of ItSolutionstuff.com. I live in India and I love to write tutorials and tips that can help to other artisan. I am a big fan of PHP, Laravel, Angular, Vue, Node, Javascript, JQuery, Codeigniter and Bootstrap from the early stage. I believe in Hardworking and Consistency.
We are Recommending you
- How to Ignore Folder in Git using Gitignore?
- How to Ignore File in Git using Gitignore?
- How to Git Ignore Some Files Locally?
- How to Clone a Git Repository into a Specific Folder?
- How to Clone Laravel Project from Github on Server?
- How to Generate and Add SSH Key in Github?
- How to Change GitHub Remote from HTTPS to SSH?
- How to Merge Branch to Master Branch using Git Command?
- Git Command to Ignore File Permission Changes
- How to Add Git Add Remote Origin on Bitbucket Repository?