Git newbie question. I have two organizations setup, and would like to duplicate/copy a repository from one organizations into another. What would be the steps for that ?
Consider testRepo
is repo name under some org or user sampleOrg
so your git url will be https://github.rackspace.com/sampleOrg/testRepo
step 1. create repo with same name under other org, where u need to duplicate.
eg: `https://github.rackspace.com/sampleOrgMirror/testRepo`
step 2. run: git clone --bare https://github.com/sampleOrg/testRepo.git
step 3: run: cd testRepo.git
step 4: run: git push --mirror https://github.com/sampleOrgMirror/testRepo.git
step 5: run: cd ..
step 6: run: rm -rf testRepo.git
now your code available in https://github.com/sampleOrgMirror/testRepo.git
you can follow link for more details https://docs.github.com/en/github/creating-cloning-and-archiving-repositories/duplicating-a-repository
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