1. 2

I saw this on HN and was immediately like, “THAT ME” :

When I’m managing my own projects, I have a lot of ideas that I want to see happen. If I’m just throwing one commit after another into main, I’ll get halfway through implementing one feature and then jump off to hacking on another. If any of the features get completed, it will be at the expense of a wasteland of half-completed features that are now taking up space in my code base.

As I read on though, I thought it was kind of … a lot of work for not that much pay-off. Wondered what yall thought

  1.  

  2. 3

    SOFA

    1. 0

      SOFA?

        1. 0

          Thanks:)

    2. 2

      I do use branches in my personal projects, though not as much. In general, if I have some CI checks that can run on my code, I will be using a branch and wait for the CI to run before merging something. If I do something that only requires one commit and I do not have any CI, and I feel confident enough, I will commit to main. If I do something that is linked to an issue on Gitea or another git web UI, or that I am not really sure of, or that is way too long to fit in one commit, it all goes in a branch.

      I do not really commit that often, because I forget to commit, I do not really like making WIP commits or committing broken code, and my projects are small enough that I barely use the Git history or need to look up exactly why I did something. When I need to see why I did something, I will be reading my code comments, my notebooks, or the comments I write on git web UIs.

      1. 0

        I do not really commit that often, because I forget to commit, I do not really like making WIP commits or committing broken code, and my projects are small enough that I barely use the Git history or need to look up exactly why I did something. When I need to see why I did something, I will be reading my code comments, my notebooks, or the comments I write on git web UIs.

        This is probably a good idea I need to do more, lol.

      2. 0

        I feel like these are all good principles, and ones I try to follow for the most part. I zealously gc --amend and gc --fixup and git rebase -i HEAD~5.

        i wish the author had gotten more into how they use git bisect because I hear git wizards praise it, but I’ve never really used it.

        I definitely believe in one branch per idea. In creative writing, I’m likely to spin off a branch as a place holder as quickly as I have ideas. Branches often take the place of a ‘drafts’ folder.

        1. 0

          I’ve never used –fixup or bisect, tbh.

          The creative writing branch thing is a great idea!