Reputation: 400
Can I modify someone's pull request to my repository and add these modifications to that pull request?
Say A forked my repo, added a feature branch, and made a pull request on my repo. I want to make some changes to the pull request, and not necessarily merge it yet, but update the pull request. Is this possible?
Upvotes: 0
Views: 385
Reputation: 2485
Long answer short: No. Not unless you have permission to edit that person's fork. You can, however, pull in the person's commits and work on top of them as shown below. Note that this will not modify the PR, but only enable you to keep the person's commits.
You could create a new branch. Then point a remote to the branch on which A submitted the PR, pull in changes from A's branch and then work on those changes.
Steps:
Assume A's fork lies at https://github.com/repo/A.git
and A's branch name is <A's_branch_name>
.
aBranch
).git pull
to pull in the branch.git checkout aBranch
. git remote add aBranchRemote https://github.com/repo/A.git
.git merge aBranchRemote <A's_branch_name>
PS: I've not tested these steps, but it should work fine. I faced a very similar situation yesterday, and this worked.
Upvotes: 1