Skip to main content
  1. Learn center
  2. Software Development
  3. Guides
  4. Git tutorial
  5. How to use Git
  6. How to use Git on Command Line
  7. Copy a remote repository
GuidesSoftware DevelopmentBacklog

Project and code management together.

Copy a remote repository

For this step in our tutorial, imagine you’re another team member and want to clone the remote repository we created and pushed to in the previous steps onto another directory so that you can work on it on your local machine. We’ll call this directory tutorial2.

Use the git clone command to copy a remote repository to the tutorial2 directory.

$ git clone tutorial2
  Cloning into 'tutorial2'...
  remote: Counting objects: 3, done.
  remote: Total 3 (delta 0), reused 0 (delta 0)
  Unpacking objects: 100% (3/3), done.

To verify that Git executed the cloning successfully, look for the following line within sample.txt of the newly cloned directory tutorial2:

Anyone can learn Git with this tutorial and Backlog

Subscribe to our newsletter

Learn with Nulab to bring your best ideas to life