Github上面拉取别人提交的PR

在github上面协同开发,避免不了拉取别的同学的PR,那么如何拉取呢?

1、首先我们看下upstream

liz@liz-PC:~/jimeng/handle-api$ git remote -v
origin    https://github.com/lz-2019/handle-api.git (fetch)origin    https:github.com/lz-2019/handle-api.git (push)remote    https:github.com/beego/handle-api.git (fetch)remote    https:github.com/beego/handle-api.git (push)

我们可以看到remote是源代码的指向

2、然后看到这个PR的ID是 213

超时信息错误 #213

3、使用fetch PR 拉取

liz@liz-PC:~/jimeng/handle-api$ git fetch remote  pull/213/head:jm5594
remote: Enumerating objects: 64,done.
remote: Counting objects: 100% (64/),done.
remote: Compressing objects: 46/46<span style=color: rgba(0,done.
remote: Total 64 (delta 17),reused 44 (delta 12),pack-reused 0展开对象中: <span style=color: rgba(128,完成.
来自 https:github.com/beego/handle-api
 * [新引用]            refs/pull/213/head -> jm5594

 

然后切到拉取的分支 

git checkout jm5594

 

相关文章

咱们在vscode中使用copilot的过程中,有可能会涉及到个人账号...
这篇文章给大家介绍怎么在GitHub上快速找到实用资源,内容非...
这篇文章主要介绍“github缓存穿透的解决方法是什么”,在日...
本篇内容介绍了“github线性回归怎么实现”的有关知识,在实...
怎样使用GitHub,很多新手对此不是很清楚,为了帮助大家解决...
今天小编给大家分享一下GitHub的高级搜索方法有哪些的相关知...