多用户Github合并请求 [英] Multi-user Github Pull Requests
问题描述
是否可以修改其他人已经启动的请求?
假设我维护项目X,并且用户A向我发送了请求。我想在合并之前更改一些内容,并可以自己快速完成。我怎样才能做到这一点,并保持在一个PR?这甚至有可能吗?
您可以这样做:
在您的回购中,
git checkout -b新分支
然后拉User A的提交到你的新分支:
pre $ g $ git pull git://github.com/ [User A] / [project-name] .git
之后,您可以在新分支中随意更改它。当您测试并满足您的更改时,您可以将其合并到您的主分支中:
git checkout master
git merge new-branch
好的,现在你已经拥有了用户A的代码和你的更改。 p>
Is it possible to amend a pull request that someone else has started?
Assume I maintain project X, and User A has sent me a pull request. There's some things I want changed before merging and can quickly do them myself. How can I do this simply and keep it all within one PR?
Is this even possible?
You can do it like this:
In your repo,
git checkout -b new-branch
Then pull User A's commits into your new-branch:
git pull git://github.com/[User A]/[project-name].git
After that, you can change it whatever you like in the new-branch. And when you test and satisfy with your changes, you can merge it into your master branch:
git checkout master
git merge new-branch
OK, now you have your code with User A and your changes.
这篇关于多用户Github合并请求的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!