• grrgyle@slrpnk.net
        link
        fedilink
        arrow-up
        28
        ·
        7 months ago

        Principle developer tip: rewrite history to make yourself seem smarter.

        Soft reset the whole branch and commit a series of atomic and semantic patches (eg separating code, test, and refactor changes) that tell a clean narrative of the changeset to reviewers, future blamers.

        • JackbyDev
          link
          fedilink
          English
          arrow-up
          3
          ·
          7 months ago

          And then my team squashes those commits 😩

          • grrgyle@slrpnk.net
            link
            fedilink
            arrow-up
            1
            ·
            7 months ago

            Yeah it sucks. If the commits are really helpful, you can just paste the git log into the PR/MR/CR body after it’s been merged

        • Elise@beehaw.org
          link
          fedilink
          arrow-up
          2
          ·
          7 months ago

          Do you put effort into your commit messages before the rewrite, or just write something quick for yourself and then put in the effort later?

          • grrgyle@slrpnk.net
            link
            fedilink
            arrow-up
            2
            ·
            7 months ago

            Depends, but usually I will put in the effort up front and maybe tweak them in an in[eractive rebase, or just manually copy+paste.

            If they’re worth saving. Sometimes you have to kill your darlings though

    • RonSijm
      link
      fedilink
      arrow-up
      9
      ·
      7 months ago
      git reset head~9
      git add -A
      git commit -am 'Rebased lol'
      git push -f