Lizza Faith
Lizza Faith

Reputation: 403

How do I update a pull request on Github?

I have created a pull request. Later I realized I need to overwrite that pull request with an updated commit. But Github does not allow me to do another pull request because of the first pending one. Can I delete the previous pull request?

Upvotes: 0

Views: 280

Answers (1)

Amber
Amber

Reputation: 527478

If you update the branch that the pull request is based off of, GitHub will automatically update the pull request to match the branch. You don't have to recreate it. Just push a new version of the branch.

If you rewrote history (e.g. commit --amend or rebase), you'll need to use the --force flag when pushing the replacement commit(s).

Upvotes: 3

Related Questions