Skip to content

Instantly share code, notes, and snippets.

@e-roux
Created September 28, 2019 15:26
Show Gist options
  • Save e-roux/8dc3f13d84426869e8c80567f90127d7 to your computer and use it in GitHub Desktop.
Save e-roux/8dc3f13d84426869e8c80567f90127d7 to your computer and use it in GitHub Desktop.
Memo: git

Duplicating a repository

Source

Important: the target repo must first be created.

git clone --bare <https://github.com/exampleuser/old-repository.git>

cd <old-repository.git>
git push --mirror <https://github.com/exampleuser/new-repository.git>

Finally, the orig repo old-repository.git can de be deleted

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment