[英]Merge github pull request branch into local branch
有没有一种方法可以将github pull request分支合并到本地分支中?
IE之类的
git clone https://github.com/tensorflow/tensorflow.git
git checkout -b work_in_progress
git merge https://github.com/tensorflow/tensorflow/pull/13107
转到您当地的分支机构并执行此操作。 如您已经在分支work_in_progress
git pull origin branch_name
如果您尚未执行任何操作,则可以运行
git fetch
git checkout branch_name // on which you want to work on
如果除master之外没有其他分支,则您已完成的工作,即在克隆后创建新分支将拥有所有数据。
您正在寻找的是
git fetch origin pull/ID/head:BRANCHNAME
然后您切换到新分支
[master] $ git checkout BRANCHNAME
然后您可以根据需要合并。 这要感谢GitHub的帮助-https: //help.github.com/articles/checking-out-pull-requests-locally/
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.