Skip to content

Instantly share code, notes, and snippets.

@zenkbaries
Created March 13, 2020 19:49
Show Gist options
  • Save zenkbaries/e9aabea01ca4c698705ddd9ca73516ef to your computer and use it in GitHub Desktop.
Save zenkbaries/e9aabea01ca4c698705ddd9ca73516ef to your computer and use it in GitHub Desktop.
Duplicate a repository

Duplicate Repo

  1. clone the repo
$ git clone --bare https://github.com/exampleuser/old-repository.git
  1. Push to new repository
$ cd old-repository.git
$ git push --mirror https://github.com/exampleuser/new-repository.git
  1. Delete old repository you recently cloned
$ cd ..
$ rm -rf old-repository.git
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment