Skip to content

Instantly share code, notes, and snippets.

@gwsu2008
Last active May 21, 2018 20:54
Show Gist options
  • Save gwsu2008/4000577dd92c594ab281285c9f26ec38 to your computer and use it in GitHub Desktop.
Save gwsu2008/4000577dd92c594ab281285c9f26ec38 to your computer and use it in GitHub Desktop.
git-clone-bare
$ git clone --mirror [email protected]/upstream-repository.git
$ cd upstream-repository.git
# Delete the open pull if necessary
git show-ref | cut -d' ' -f2 | grep 'pull-request' | xargs -L1 git update-ref -d
$ git push --mirror [email protected]/new-location.git
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment