• Ferk@kbin.social
    link
    fedilink
    arrow-up
    4
    ·
    edit-2
    11 months ago

    Many hosts allow you to set rules to protect branches from getting their commits removed in the remote (in fact, I think that’s the default for gitlab main branches) or to prevent people from pushing their commits to them directly.
    I expect even “the main branch has to stay more or less in sync with origin/main” can be automated… though it might not be what you always want, depending how you work.

    • thanks_shakey_snake
      link
      fedilink
      arrow-up
      6
      ·
      11 months ago

      I think that’s treading into “GitLab/Hub/Bitbucket/etc. are not git” territory. Good feature, but not in the product that the post is about.

      Still glad you mentioned it, though-- Maybe someone just learned about it because of you.