合并GitHub将请求分支合并到本地分支



有没有办法将github拉的请求分支合并到本地分支?

ie

git clone https://github.com/tensorflow/tensorflow.git
git checkout -b work_in_progress
git merge https://github.com/tensorflow/tensorflow/pull/13107

您要寻找的是

git fetch origin pull/ID/head:BRANCHNAME

然后您切换到新分支

[master] $ git checkout BRANCHNAME

然后您可以按照自己的意愿合并。这要归功于github帮助-https://help.github.com/articles/checking-up-pull-requests-locally/

转到您的本地分支并执行此操作。就像您已经在分支work_in_progress

git pull origin branch_name

如果您尚未承诺任何事情,可以运行

git fetch
git checkout branch_name // on which you want to work on

如果除了主人之外没有任何分支,那么您已经做了什么,即,克隆之后创建新的分支将拥有所有数据。

最新更新