• forgeddit@sopuli.xyz
          link
          fedilink
          arrow-up
          1
          ·
          edit-2
          1 year ago

          My go-to these days is to push the current branch, dynamically.
          git push origin HEAD

          Depending on the VC, HEAD has different prefix/suffixes to make it work.

          Edit: formatting, also I never checkout master I do origin/master so I cannot even push it with this method. I think

    • DacoTaco@lemmy.world
      link
      fedilink
      arrow-up
      8
      ·
      1 year ago

      I was wondering the same. Any branch that has any logic besides a ci build attached to it should have been force push protected by default…

    • sebsch
      link
      fedilink
      arrow-up
      1
      ·
      1 year ago

      Git rebase makes it possible getting used to do so