git 自己创建了一个项目A,我的同事fork一个B,当我的项目更新的时候,怎么样在他fork的repo上进行相应的更新?

  • 先把B clone到本地
    git clone B_REPOSITORY_URL
  • 再cd到本地B的目录,把A作为一个remote加到本地的B中(一般命名为upstream)
    git remote add upstream A_REPOSITORY_URL
  • pull另一个A的remote(upstream)的相应分支(比如master)就可以
    git pull upstream master
  • 最后push回github的B_REPOSITORY
    git push origin master
原文地址:https://www.cnblogs.com/zhizhao/p/7928436.html