⇦ Back to: Clean up | ⇧ Overview | ⇨ Next: Merge Conflict

How to update your Pull Request

Reasons you might want to update a pull request include:

These two cases are dealt with differently.

Addressing comments and requested changes

Wait until you have the amount of feedback you need.

Merging changes from main

If another PR is merged into main before yours, you can update your branch.

If someone else has changed how a piece of code works, it’s good to check that your changes still work with the other person’s update, or whether you need to make new changes yourself.

Using GitHub

If there are no conflicts detected, then the pull request will show this at the bottom:

https://user-images.githubusercontent.com/2803227/194438225-31ec29cd-d0ab-4823-8f0b-0ee40931af31.png

If there are conflicts, it will offer you the option to resolve the merge conflicts (covered in the next section).

https://user-images.githubusercontent.com/2803227/194438004-d394cf27-93ab-4fa3-9f7d-b06ea0a301f9.png

<aside> 💡 Repository Admins can go into the repository Settings and activate the option “Always suggest updating pull request branches”, to show an “update branch” button at the bottom of the pull-request, for cases when “main” has been updated.

https://user-images.githubusercontent.com/2803227/194438340-d367d69d-dc23-40fa-9daf-17ae0b1612d4.png

</aside>