Git - Duplicating or Renaming a Repository

By Jack Szwergold • September 15, 2015

How to duplicate and rename a repository.

First step is to create a new repo on GitHub.

Make a bare clone of the source repository.

git clone --bare --recursive

Go into that directory.

cd Memories.git

Now push (via mirror) into the new repo.

git push --mirror

If any git clone copies s of the repo exist somewhere, change the origin URL this way.

git remote set-url origin