I want to migrate the remote git repository to another new repository. How to migrate it completely (including all branches, not just master)?
Use the following method to clone the bare version library and then push only the master branch. Is there any simple way to clone all the branches in the warehouse at one time (the remote warehouse has more branches).
git clone --bare git://github.com/username/project.git
git push --mirror git@gitcafe.com/username/newproject.git
过去多啦不再A梦2017-05-02 09:41:39
Image Clone:
git clone --mirror https://github.com/../old.git old.git
cd old.git
Then push the image:
git remote set-url --push origin git@gitcafe.com/.../new.git
git push --mirror
Or push a new remote and then push:
git remote add mirror origin git@gitcafe.com/.../new.git
git push mirror --all
git push mirror --tags
给我你的怀抱2017-05-02 09:41:39
git clone git://github.com/username/project.git
git push origin
Try it
In addition, if you move a GitHub warehouse to another GitHub account or group, you can use fork
巴扎黑2017-05-02 09:41:39
If you have administrative rights, just transfer directly in the management interface.
Your clone operation takes all branches (except pr ref). Your push operation only has one branch.