I have a repo on github that contains a web application that's deployed to two different domains. The application has slight logic forks here and there to behave differently depending on which domain it's deployed to.
It's come to the point to where I want to split it into two separate repos, one for each domain.
Github won't let me fork it into the same organization. Searching for "git duplicate repo" suggests I should bare clone and mirror push it, but that seems to be for keeping both repos in sync, which I don't want to do.
What's the best way to go about this? I'd like to preserve the old commit history in the new copy if possible.
Just create a new repository and push to it from your working copy:
git clone [email protected]:me/myrepo-original cd myrepo-original git remote set-url origin [email protected]:me/myrepo-new git push origin master
Now you have a new repository, myrepo-new
, which is identical to myrepo-original
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With