How to Clone Github Repository using Command Line?
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 firstname.lastname@example.org: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.
Now, you can check what you made changes using git status command:
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...
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 git command line?
- How to git ignore file permissions changes for commit?
- How to add git add remote origin on bitbucket repository ?