<div dir="ltr"><br><br>On Fri, Sep 10, 2021 at 7:51 PM Vaclav Petras <<a href="mailto:wenzeslaus@gmail.com">wenzeslaus@gmail.com</a>> wrote:<br>><br>><br>><br>> On Fri, Sep 10, 2021 at 1:16 PM Markus Metz <<a href="mailto:markus.metz.giswork@gmail.com">markus.metz.giswork@gmail.com</a>> wrote:<br>>><br>>> ...<br>>> $ git checkout raster_tempdir<br>>> $ git rebase main<br>>><br>>> Successfully rebased and updated refs/heads/raster_tempdir.<br>>><br>>> $ git status<br>>> On branch raster_tempdir<br>>> Your branch and 'metzm/raster_tempdir' have diverged,<br>>> and have 48 and 7 different commits each, respectively.<br>>>   (use "git pull" to merge the remote branch into yours)<br>>><br>>> $ git push metzm raster_tempdir<br>>> ! [rejected]            raster_tempdir -> raster_tempdir (non-fast-forward)<br>>> error: failed to push some refs to 'github.com:metzm/grass.git'<br>>> hint: Updates were rejected because the tip of your current branch is behind<br>>> hint: its remote counterpart. Integrate the remote changes (e.g.<br>>> hint: 'git pull ...') before pushing again.<br>>> hint: See the 'Note about fast-forwards' in 'git push --help' for details.<br>><br>><br>> This is how it is supposed to behave when you do `git rebase`. Rebasing re-applies the changes you made in raster_tempdir one by one on top of your local main. This creates different commits in the sense that the commit hashes are different. This causes the "have diverged" part. 48 on the local raster_tmpdir is your 7 commits plus 41 commits which happened in the main branch since you created raster_tempdir. 7 commits on metzm/raster_tempdir is the original commits you made which have the original, different hash, so Git considers them to be different.<br>><br>> Force push with `git push -f metzm raster_tempdir` is appropriate here. You will replace whatever is in the remote branch by your newly updated (rebased) local branch content.<br><div><br></div><div>A force push helped, thanks! The commit history of the PR has not been messed up, only the relevant commits are shown.</div><div><br></div><div>The reason for the rebase was that some tests were failing, apparently because of a combination of renaming master to main and changes to GHA, and a PR can only be squashed and merged if all tests are passed.</div><div><br></div><div>Thanks for the fast response!<br></div><div><br></div><div>Markus M<br></div><br></div>