How to fix commit order in GitHub pull requests, broken by git rebase?

I’ve managed to work around this by:

  1. Locate the last commit that retained the order
  2. Run git rebase -i <hash of that commit>
  3. Replace all pick with reword
  4. Run git push -f

Before that, I tried changing only the first commit message, which also changes all the following hashes, but that didn’t fix it.

I had to do it for every following commit too for it to work.

Leave a Comment