Fer
Fer

Reputation: 460

Amend merged pull request

I made a pull request which was merged to a project. It so happens that the code needs a minor modification. How can I possibly change this with no access to the master project whatsoever? Am I out of luck and I have to do a new PR?

Thanks.

Upvotes: 0

Views: 287

Answers (1)

Chris
Chris

Reputation: 136880

Yes, you should submit another pull request.

When using any of Git's "rewriting" commands like commit --amend or rebase it is important that you avoid changing shared commits.

In its Rebasing chapter, the Git Book says:

The Perils of Rebasing

Ahh, but the bliss of rebasing isn’t without its drawbacks, which can be summed up in a single line:

Do not rebase commits that exist outside your repository.

If you follow that guideline, you’ll be fine. If you don’t, people will hate you, and you’ll be scorned by friends and family.

When you rebase stuff, you’re abandoning existing commits and creating new ones that are similar but different. If you push commits somewhere and others pull them down and base work on them, and then you rewrite those commits with git rebase and push them up again, your collaborators will have to re-merge their work and things will get messy when you try to pull their work back into yours.

Upvotes: 1

Related Questions