How do I synchronise two remote Git repositories?

后端 未结 6 900
北荒
北荒 2020-12-24 08:40

I have two repository urls, and I want to synchronise them such that they both contain the same thing. In Mercurial, what I\'m trying to do would be:

hg pull         


        
6条回答
  •  萌比男神i
    2020-12-24 09:09

    For something similar I use this simple code trigerred by webhook in both repositories to sync GitLab and Bitbucket master branch:

    git pull origin master
    git pull gitlab master
    git push origin master
    git push gitlab master
    

    It propably is not what you need in question, but it could be helpful for somebody else who needs to sync just one branch.

提交回复
热议问题