How to have a reasonable Git tree
As of time of writing, my Git tree is in a messed up state, because I wanted to focus on feature development rather than breaking things up into logical commits. However, I think I could still use Git to somewhat break things up, and not leave things until the very last minute, although there is a fine line to be found there (see Don’t prematurely optimize, but don’t ignore low-hanging fruit either 202205030156). One interesting heuristic is:
- Incrementally add “wip” commits. In the commit, describe the primary idea that was changed in 5 words or less
- Once I’m done and want to coalesce things, do an interactive rebase to align relevant changes with each other. This is before you’ve pushed anything up (on the primary branch at least, so it’s okay if you’re “breaking history”).
Created from: 3-5 Things I Want To Do Today 202205030143]
uid: 202205030149 tags: #software-engineering #insights #howto