Neil Middleton Neil Middleton - 1 year ago 100
Git Question

Multi-user Github Pull Requests

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?

Answer Source

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://[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.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download