How To Clone A Git Repository To Local In Windows
Y'all have created a repository on Github and want to create a local copy on your figurer?
This post will evidence y'all how you can sync a local re-create of your Github remote repository on Windows.
First, you need to install Git on your computer.
Clone Your Github Repository
To clone your Github repo on Windows.
- Open Git Fustigate
If Git is non already installed, it is super unproblematic. Only become to the Git Download Binder and follow the instructions.
- Go to the electric current directory where you want the cloned directory to be added.
To do this, input
cd
and add your folder location. You tin can add the folder location by dragging the binder to Git bash.
$ cd '/c/Users/j-c.chouinard/My Outset Git Project'
- Go to the page of the repository that y'all want to clone
- Click on "Clone or download" and copy the URL.
- Use the git clone command along with the copied URL from before.
$ git clone https://github.com/USERNAME/REPOSITORY
- PressEnter.
$ git clone https://github.com/USERNAME/REPOSITORY
Cloning into Git …
remote: Counting objects: xiii, done.
remote: Compressing objects: 100% (13/13), done.
remove: Total xiii (delta one), reused 0 (delta i)
Unpacking objects: 100% (13/13), done.
Congratulations, you have created your kickoff local clone from your remote Github repository. See how you lot tin commit a file to your Github repository.
Become a Git Master
Although very powerful, Git is very complex. I highly recommend that you follow Datacamp's Git course to really become comfortable with Git commands and avoid painful mistakes.
- Introduction to Git
Duplicate a Repository
If you want to make individual a forked repository, you can duplicate the repository.
Stride 1: Become to Github
Step 2: Create a new repository
Here I will proper noun my repository PVT-new-repository.
Footstep iii: Go to the quondam repository
Step 4: Click on "Clone or download" and re-create the URL.
Pace 5: Open up Git Fustigate
Step six: Create a bare clone of the repository.
$ git clone --bare https://github.com/username/old-repo.git
Stride vii: Push a Mirror to the new repository.
$ cd old-repository.git
$ git push button --mirror https://github.com/username/PVT-new-repository.git
Remove the temporary local repository yous created in pace 1.$ cd ..
$ rm -rf old-repository.git
This is it.
Yous now know how to Clone a Github Repository on Your Reckoner.
SEO Strategist at Tripadvisor, ex- Seek (Melbourne, Australia). Specialized in technical SEO. In a quest to programmatic SEO for large organizations through the use of Python, R and motorcar learning.
Source: https://www.jcchouinard.com/clone-github-repository-on-windows/
Posted by: phelpspriever.blogspot.com
0 Response to "How To Clone A Git Repository To Local In Windows"
Post a Comment