• Geodad@lemm.ee
    link
    fedilink
    English
    arrow-up
    42
    arrow-down
    1
    ·
    edit-2
    3 days ago

    There is a cli tool called “the fuck”.

    When you mess up a command, type fuck and it fixes it for you.

    • Zagorath@aussie.zone
      link
      fedilink
      arrow-up
      26
      ·
      4 days ago

      I love fuck! I can never be bothered creating upstream Git branches when I’ve branched locally, I just type git push and it complains there’s no upstream, and then I type fuck and it does it for me.

      • frosch@sh.itjust.works
        link
        fedilink
        arrow-up
        11
        ·
        3 days ago

        There is also a zsh-Plugin for the fuck. That way you can just double hit esc and zsh… uhm… fucks… automatically for you

          • slampisko@lemmy.world
            link
            fedilink
            arrow-up
            3
            arrow-down
            1
            ·
            3 days ago

            It’s less typing but technically it’s one more request to the server which you have to wait for to fail before the correct request can be fucked, so it might be faster to do it the correct way from the get-go. Especially if you’ve done it before and you can just Ctrl+R and find it in the history, or you have a git alias (e.g. git phead)

            • Zagorath@aussie.zone
              link
              fedilink
              arrow-up
              2
              ·
              3 days ago

              No, your local Git knows the branch isn’t tracking any upstream branch, so it never makes a request to the server.