On Fri, Dec 09, 2022 at 07:59:52PM +0100, Uwe Brauer wrote: [...] > (hg) push -f > > That is a forced push, github and bitbucket accept that, while gitlab tells > me > > abort: pushing refs/heads/main overwrites d30105a181c4
This stuff is configurable in GitLab, and I suspect that's what you're encountering. In the Settings -> Repository panel, there are sections named "Protected Branches" and "Protected Tags", and I think GitLab has "master" protected from force-pushes by default. The reasoning is that in a typical enterprisey workflow you never has a need to overwrite master (and in a shared repository with many developers that's almost always a bad idea anyway): mostly because you do all the normal work on side branches, which you can overwrite at will, and they are merged to master when they are ready. Even if a branch was merged by mistake, you usually "unmerge" it by reverting that change (what `git revert` would do) which creates another commit, so, again, no need to force-push anything. See [1] for more info. 1. https://docs.gitlab.com/ee/user/project/protected_branches.html -- You received this message because you are subscribed to the Google Groups "Git for human beings" group. To unsubscribe from this group and stop receiving emails from it, send an email to git-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/git-users/20221210104544.x3rbp563ewnpykgy%40carbon.