找到你要的答案

Q:Multi-user Github Pull Requests

Q:多用户GitHub的请求

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?

是否有可能修改别人已经开始的拉请求?

假设我维护项目X,用户A已经给我发送了一个请求。有些事情我想改变之前合并,可以很快做他们自己。我怎样才能做到这一点简单,并保持在一个公关?

这是否可能?

answer1: 回答1:

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.

你可以这样做:

在你的回购,

git checkout -b new-branch

然后将用户A提交到您的新分支:

git pull git://github.com/[User A]/[project-name].git

之后,你可以在新的分支中改变你喜欢的东西。当您测试并满足您的更改时,您可以将其合并到主分支中:

git checkout master
git merge new-branch

好吧,现在你有你的代码,用户和你的变化。

answer2: 回答2:

Assuming you have read and write access to the user's github repository you can push to the branch that the pull request is coming from.

It's on the bottom of the pull request before the MERGE PULL REQUEST button.

You can add more commits to this pull request by pushing to the XXXXX branch on yyyy/zzzzz

假设你有读写权限,你可以推拉的要求是来自分公司用户的GitHub库。

在合并请求按钮之前,在拉请求的底部。

你可以添加更多的致力于这把请求推在YYYY / zzzzz的xxxxx分支

answer3: 回答3:

Unfortunately, no, the following does not work:

git push -f upstream my-updates:refs/pull/999/head ... ! [remote rejected] my-updates -> refs/pull/999/head (deny updating a hidden ref) error: failed to push some refs ...

不幸的是,没有,下面不工作:

git push -f upstream my-updates:refs/pull/999/head ... ! [remote rejected] my-updates -> refs/pull/999/head (deny updating a hidden ref) error: failed to push some refs ...

answer4: 回答4:

Not possible, but you can submit a second pull request to their branch, which would update the original pull request if they decide to merge it.

不可能,但是你可以向他们的分支提交第二个请求,如果他们决定合并的话,它会更新原来的请求。

answer5: 回答5:

I realize this is an old question, but GitHub has recently introduced some new features that make it possible to actually update a pull request submitted by another user.

When you are creating a new pull request, you'll see a checkbox labelled "Allow edits from maintainers". This is enabled by default.

With this in place, anyone with commit access to the repository that is the target of your pull request will also be able to push changes to the branch of your repository that is the origin of the pull request.

This is especially use in team environments in which everyone has commit access to the "main" repository, but all work is done on feature branches in individual forks. It means that if there is an open pull request that needs some changes and the primary author is unavailable, someone else on the team can make the necessary updates directly, rather than closing the existing PR and opening a new one.

我意识到这是一个老问题,但GitHub最近推出了一些新的功能,能够通过更新另一个用户提交pull请求。

当你创建一个新的拉的请求,你会看到一个复选框标记为“允许编辑与维护”。默认情况下启用。

有了这一点,任何人的承诺访问的存储库,这是你的拉请求的目标也将能够推动变化的分支,你的仓库,这是拉动请求的起源。

尤其是在团队环境中,每个人都可以访问“主”存储库,但是所有的工作都是在各个叉上的特征分支上完成的。这意味着,如果有一个开放的拉请求,需要一些变化和主作者是不可用的,团队的其他人可以直接作出必要的更新,而不是关闭现有的PR和打开一个新的。

answer6: 回答6:

It is possible! All you have to do it check out the branch that is in their pull request and make the changes you want. After you commit and push those changes they should be reflected in the pull request in Github.

这是可能的!所有你必须做的检查出的分支,是在他们的拉请求,使您想要的变化。你承诺和推动这些变化应该体现在GitHub上拉请求后。

git  github