Git 如何找到其他人';s pull请求(修复它)
我们是一个程序员团队 我们有一个项目的主要回购协议 我们团队中的一名程序员向该回购协议发出了请求 我需要解决他的请求。我不是回购协议的主要所有者 我如何获取他的代码 当我去他的账户时,我看不到回购协议的分支(可能是私人的) 是这样做的吗Git 如何找到其他人';s pull请求(修复它),git,github,Git,Github,我们是一个程序员团队 我们有一个项目的主要回购协议 我们团队中的一名程序员向该回购协议发出了请求 我需要解决他的请求。我不是回购协议的主要所有者 我如何获取他的代码 当我去他的账户时,我看不到回购协议的分支(可能是私人的) 是这样做的吗 $ git remote add <name> <source> # for <source> - link to his pull request $ git fetch <name> $ git merge &
$ git remote add <name> <source> # for <source> - link to his pull request
$ git fetch <name>
$ git merge <name>/<branch>
$git remote add#for-链接到他的拉取请求
$git获取
$git合并/
git remote add ...
git branch other_branch
git checkout other_branch
注意:当然,您可以在单行中将该命令与上一个命令合并:
git checkout -b other_branch
git pull other_source other_branch
git add
git commit
(注意:在这种情况下,您显然无法将提交推送到pull请求)git pull${his_fork\u url\u here}huh在我的git上,您在
git add remote
之后指定分支作为参数,这比“top”答案更简单、更好
git fetch origin pull/<pull-request-id>/head:<local-branch-name>
git checkout <local-branch-name>
git remote add upstream git@github.com:whoever/whatever.git
git fetch upstream pull/<pull-request-id>/head:<local-branch-name>
...