git:如何将拉取请求合并到派生?
我的情况如下: -我有一个开源github项目的分支. -我在我的开发分支中的分支仓库中进行所有开发 -我在主仓库的开发分支中有一个未合并的拉取请求 -为了测试未合并的请求,我创建了一个新目录并克隆了原始目录,然后将未合并的请求提取到主目录 -现在,我已经测试了未合并的合并请求,我需要将合并请求与我的develop分支合并.
My situation is as follows: - I have a fork of an opensource github project. - I do all of my development in my forked repo in branches from the develop branch - There is an unmerged pull request I need in the main repo's develop branch - To test the unmerged pull request I created a new directory and cloned origin to it then fetched the unmerged request to the main - Now that I've tested the unmerged pull request, i need to merge the pull request with my fork of develop.
哪些步骤将允许我将拉取请求合并到本地分叉中?
What steps will allow me to merge the pull request into my local fork?
~/your-repo $ git remote add pr-source https://github.com/<user-providing-pull-request>/<repo-name>
~/your-repo $ git fetch pr-source
~/your-repo $ git merge pr-source/<pull-request-branch-name>
请注意:
- 您不需要主存储库,无论是从github还是从本地克隆
- 您不需要提供提取请求的仓库的克隆,只需将其作为远程
- 您不必称其为
pr-source
,我只是将其用作拉动请求源"
- you don't need the main repo, either from github or cloned locally
- you don't need a clone of the repo providing the pull request, you just need it as a remote
- you don't have to call it
pr-source
, I was just using that as "pull request source"