• foxymulder@lemmy.ml
        link
        fedilink
        English
        arrow-up
        39
        ·
        1 year ago

        “patch mode” - Patch mode allows you to stage parts of a changed file, instead of the entire file. This allows you to make concise, well-crafted commits that make for an easier to read history.

        • pomodoro_longbreak
          link
          fedilink
          arrow-up
          14
          ·
          1 year ago

          Highly recommend throwing --patch on any git commands you’re used to using. You will have the prettiest, most atomic fkn commit, I’m serious people will love you for it.

          I mean many people won’t care, but the quality folk will notice and approve.

            • pomodoro_longbreak
              link
              fedilink
              arrow-up
              2
              ·
              1 year ago

              Trunk based, eh? Yeah, we do that on a couple teams where I’m at, too. I like the philosophy, but force pushing the same commit over and over as you’re incorporating review feedback is antisocial, especially when you’ve got devs trying to test your changes out on their machines.

            • pomodoro_longbreak
              link
              fedilink
              arrow-up
              2
              ·
              1 year ago

              I’ve only tried the VS code hunk stager thing, and found it cumbersome compared to command line, but if you can make a GUI work for you ya go for it. I’ve never found it worth the trouble personally

              • oce 🐆@jlai.lu
                link
                fedilink
                arrow-up
                2
                ·
                1 year ago

                You should try the JetBrains IDEs, as the other said, you can pick changes line by line graphically, when you commit, when you do a diff with another branch or when you fix conflicts. It’s much more convenient than commands and terminal text editors.

      • sip@programming.dev
        link
        fedilink
        arrow-up
        6
        ·
        1 year ago

        uuuuuuuu. and you could do -m to describe the commit.

        next they’ll add --push/-P.

        perhaps add -r for fetch/rebase then commit.

        one command to rule them all! 😈