Skip to content

Instantly share code, notes, and snippets.

@r-sal
Created March 15, 2013 00:08
Show Gist options
  • Save r-sal/5166427 to your computer and use it in GitHub Desktop.
Save r-sal/5166427 to your computer and use it in GitHub Desktop.
Git Repository Notes

Duplicating a repository

$ git clone --bare https://github.com/exampleuser/old-repo.git
# Make a bare clone of the repo


cd old-repo.git
$ git push --mirror https://github.com/exampleuser/new-repo.git
# Mirror-push to the new repo


cd ..
$ rm -rf old-repo.git
# Remove our temporary local repo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment