Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

My rule of thumb for commits is that they should be of a size and scope suitable for cherry-picking. So, maybe I'm working on a small feature that entails three changes, and each of those three changes is useful in and of itself and could conceivably be cherry-picked by others. I would create three separate commits, generate a PR with all three, and merge in the work. Sure, I could squash merge and end up with one merge commit encompassing all three changes, but now none of those three changes is cherry-pickable.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: