我如何查看GitHub拉取请求? [英] How can I check out a GitHub pull request?
问题描述
我想查看以前创建的拉请求(通过GitHub网页界面创建)。我搜索并发现不同的地方,其中一个refs / pull或refs / pull / pr
但是当我添加 fetch = + refs / pull / * / head:refs / remotes / origin / pr / *
到git config文件并执行git fetch
? GitHub应该自动创建pull / xyz的东西,还是我必须配置一些东西?
解决方案本地回购,
git fetch origin pull / ID / head:BRANCHNAME
其中ID是拉取请求标识,branchname是您要创建的新分支的名称。一旦你创建了分支,那么只需简单地
git checkout BRANCHNAME
I'd like to check out a previously created pull request (created via GitHub web interface). I searched and found different places where a refs/pull or refs/pull/pr
But when I add fetch = +refs/pull/*/head:refs/remotes/origin/pr/*
to the git config file and do a git fetch
What I'm doing wrong? Should GitHub create automatically the pull/xyz stuff, or do I have to configure something?
To fetch a remote PR into your local repo,
git fetch origin pull/ID/head:BRANCHNAME
where ID is the pull request id and branchname is the name of the new branch that you want to create. Once you have created the branch, then simply
git checkout BRANCHNAME
这篇关于我如何查看GitHub拉取请求?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!