Skip to content

Instantly share code, notes, and snippets.

@TheoKondak
Last active March 10, 2023 15:04
Show Gist options
  • Save TheoKondak/a0ab009357edc29900e3877f88717c83 to your computer and use it in GitHub Desktop.
Save TheoKondak/a0ab009357edc29900e3877f88717c83 to your computer and use it in GitHub Desktop.
Github Tips & Tricks

If you have a private repository, and you want to copy it to another account, along with commit history etc you can:

  • Create a new repo newRepo
  • Create a tempFolder
  • git clone --mirror <old-repo> <tempFolder>
  • git push --mirror
  • git remote set-url --push origin <new-repo>
  • Delete the tempFolder
  • Pull the newRepo
  • Check that everything works
  • Done

Credits to Alkis

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