[GRASS-dev] Renaming master branch to main branch

Markus Metz markus.metz.giswork at gmail.com
Fri Sep 10 11:29:50 PDT 2021


On Fri, Sep 10, 2021 at 7:51 PM Vaclav Petras <wenzeslaus at gmail.com> wrote:
>
>
>
> On Fri, Sep 10, 2021 at 1:16 PM Markus Metz <markus.metz.giswork at gmail.com>
wrote:
>>
>> ...
>> $ git checkout raster_tempdir
>> $ git rebase main
>>
>> Successfully rebased and updated refs/heads/raster_tempdir.
>>
>> $ git status
>> On branch raster_tempdir
>> Your branch and 'metzm/raster_tempdir' have diverged,
>> and have 48 and 7 different commits each, respectively.
>>   (use "git pull" to merge the remote branch into yours)
>>
>> $ git push metzm raster_tempdir
>> ! [rejected]            raster_tempdir -> raster_tempdir
(non-fast-forward)
>> error: failed to push some refs to 'github.com:metzm/grass.git'
>> hint: Updates were rejected because the tip of your current branch is
behind
>> hint: its remote counterpart. Integrate the remote changes (e.g.
>> hint: 'git pull ...') before pushing again.
>> hint: See the 'Note about fast-forwards' in 'git push --help' for
details.
>
>
> 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.
>
> 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.

A force push helped, thanks! The commit history of the PR has not been
messed up, only the relevant commits are shown.

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.

Thanks for the fast response!

Markus M
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/grass-dev/attachments/20210910/09e88686/attachment-0001.html>


More information about the grass-dev mailing list