I had created PR to the open-source project in GitHub and once the reviewer reviewed my pull request I got some feedback to change on my code. So, I changed the code according to the feedback and committed the code.  However, my PR was still opened but my newly committed code based on the feedback didn’t reflect on that pull request.

So I tried to resolve the issue using different ways; however none of them worked. Eventually, I found the solution and I would like to share here so that it will be helpful to anyone having similar kind of issue.

The first thing you need to check is whether you have pushed the code to the correct branch. In my case, the Branch was correct. However I was facing problem with new commit not reflected in the opened PR. Below is solution how I sort out the GitHub pull request issue.

Solution

Once you have committed the new changes and if the new commit hasn’t been reflected to the PR then you can follow the below steps.

Step1: Go to the opened pull request and click on Edit option in the top right corner.

Step 2: Then click on the base selector and choose the same base branch as earlier. My case, I created Pull request to main branch so select main.

Step 3: After that GitHub will automatically pop up whether you want to change the base branch for your confirmation. You just click confirm.

Step 4: Then wait for a few seconds, your PR should be updated with the new commit.

In this way we can resolve the issue. I hope, you will find it useful if you encounter similar issue.

Leave a Reply

Your email address will not be published. Required fields are marked *