banner



How To Clone A Git Repository To Local In Windows

This post is office of the complete guide on Git and Github

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.

  1. Open Git Fustigate

    If Git is non already installed, it is super unproblematic. Only become to the Git Download Binder and follow the instructions.

  2. 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'

  3. Go to the page of the repository that y'all want to clone
  4. Click on "Clone or download" and copy the URL.

  5. Use the git clone command along with the copied URL from before.

    $ git clone https://github.com/USERNAME/REPOSITORY

  6. 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.

Nosotros utilize cookies on our website to give you the nigh relevant experience by remembering your preferences and repeat visits. By clicking "Accept", you consent to the use of ALL the cookies.

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

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2

Iklan Bawah Artikel