0

How can I create a local repository and then create another local repository by cloning the first one?

I would like to do it for experimentation with git pull and git push.

Roman
  • 112,185
  • 158
  • 335
  • 439
  • Why do you need a separate repo to test `git push` and `git pull`? Wouldn't creating a test branch somewhere be just as effective? – Tim Biegeleisen Dec 21 '17 at 10:29
  • 1
    When you clone from a remote repository, you specify the url as `git clone `. The url could be a path to a local repository. – ElpieKay Dec 21 '17 at 10:30

1 Answers1

13

Just put path to repo you want to clone

git clone /home/my_user/my_project
atomAltera
  • 1,570
  • 1
  • 15
  • 37