我想将我的远程 git 存储库及其所有分支移动到一个新的远程存储库。
旧 Remote = git@github.com:thunderrabbit/thunderrabbit.github.com.git
new remote = git@newhub.example.net:tr/tr.newrepo.git
最佳答案
在本地机器的终端中:
cd ~
git clone <old-remote> unique_local_name
cd unique_local_name
for remote in `git branch -r | grep -v master `; \
do git checkout --track $remote ; done
git remote add neworigin <new-remote>
git push --all neworigin
关于git - 如何将我的远程 git 存储库移动到另一个远程 git 存储库?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14432234/