How do you update your github PR branch?
I am trying to update my current pull request branch for dgs-1210-10mp.

But I have only managed to get two more or less bad output results.
First try with the merge choice pushed all updated commit to the pull request, and that was a mess to clean up.
Second try is like the instruction in the link with a merge and rebase but it will still push a single empty commit message into the pull request saying I have updated the branch.

Seriously, isn’t there any way to update old pull request branches without leaving a forbidden trail?
Or do I have to close the PR and start all over with a completely new branch after a couple of days?
How do you upgrade your PR branch?

Force push the update branch, its as simple as that, and also stop using Github GUI as it lacks basic functionality like this


Do not do this.
Thank you for asking for help before spam creating a related PR. When that happens, the review and context of the previous PR is not associated with the new one, and it wastes people's time and patience.

When I want to change a Gihub PR, this is my general process using the git CLI

  • Change my files, and fixup my commits with git add -p, and git commit --amend (amend: change the last/top git commit).
    • With multiple commits in a PR I will add new fixup temporary commits, then squash or fixup them with their related commits in an interactive rebase: git rebase -i master, or make my fixes during the rebase.
  • Compile and test my changes
  • force push to my Github PR branch to update it: git push --force my_PR_branch

You can test this out (and avoid annoying reviewers / managers) by opening a PR on your own Github fork (change the base repository to your fork when creating this test PR).

1 Like

And on top of that! Never ever use Github desktop! Never! And i mean it! It may be fine when working with your self but that is it!
Pretty much every single administrative problem I have had with this ”official” PR I am working with has been traceable back to the meaningless Github Desktop.

Generally I have managed to work a lot better with the Linux laptop terminal on this project after i put it back in draft mode and went back to the drawing board to try again.

If anybody wants a GIT GUI, I can recommend Gitkraken, been using it for years for the log, staging hunks, looking at diff-s and resolving conflicts.
It can do other advanced stuff, but its slow at that so I just use git cli for 90% of the stuff.


I finally found a solution that actually works.

git pull origin master —rebase

note that — is actually - - but without the space since all computers remove the lityle space when writing a double tap.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.