Notes

Git - Duplicate a repository

author: Paul Kim

categories: git

tags: git

Duplicate a repository

I recently renamed one of my repositories on GitHub from paul-kim to paulkode:

  1. Create a new repository on GitHub called paulkode.
  2. Duplicate paul-kim to paulkode:
# create a bare clone of the old repo
git clone --bare git@github.com:kimbaudi/paul-kim.git
# mirror-push to the new repo
cd paul-kim.git
git push --mirror git@github.com:kimbaudi/paulkode.git
# remove the temporary local repo you created
cd ..
rm -rf paul-kim.git
Source

Duplicating a repository


ChromeEdgeFirefoxOpera

© 2021 paulkode.com. All rights reserved.