• Caveman@lemmy.world
    link
    fedilink
    arrow-up
    7
    arrow-down
    1
    ·
    3 months ago

    g-push which is alias for

    git push origin `git branch --show`
    

    Which I’m writing on my phone without testing or looking

    • Cruxil 🇦🇺
      link
      fedilink
      English
      arrow-up
      2
      ·
      3 months ago

      git push origin HEAD is a slightly shorter way of doing the same thing, even though you have an alias anyway lol

        • JackbyDev@programming.dev
          link
          fedilink
          English
          arrow-up
          1
          ·
          edit-2
          3 months ago

          When you’re pushing a new branch you’ve never pushed before you need the -u command. That’s what this alias is for.

          As long as the config’s push.default isn’t matching, git push without arguments will only push the current branch.