gitgithubgitlabgit-pushgit-pull

Updating pull request after review changes commit doesn't show up in the pull request


I forked a GitHub repository and made some changes on my fork and submited a pull request but the owners of the original GitHub repository asked for some changes which they asked me for in the pull request. I assumed that adding additional changes to my fork will cause them to show up in the current pull request but to my surprise I can't see my changes in the pull request.

This is what I did after generating the original pull request:

  1. made code changes
  2. add the files git add -A
  3. commit the files git commit -m "these are my suggested changes in pull request"
  4. submit my changes with git push

I can see changes on my own fork but I don't understand why I can't see any changes in the pull request.

Does anyone know what I need to do for my changes to show up in the current pull request?

I'd really appreciate your help.


Solution

  • 2023: as noted in KangaroosInAntarctica Yes's answer, you have a specific workaround for a potential issue where commits may not appear in a pull request even though they've been pushed to the correct branch.

    By editing the base selector and choose the same base branch.

    Note however that there is a GitHub incident with Pull Requests in progress (July 5th, 2023):

    We have identified an issue that caused pull requests to not reflect additional git pushes over the last several hours. New pushes will now be processed as normal.

    So that workaround might not be needed much longer.


    2017: You need to be sure to be in the same branch as the one you used for your pull request.

    As mentioned here

    The pull request will automatically add the new commits at the bottom of the pull request discussion (ie, it's already there, scroll down!)

    If the pull request is still open, you should see your new commit there.
    If not, contact GitHub support: there might be some synchronization issue.