January 24th 2024, 6:43:25 pm EST #

Branches are a bandaid for working in too large and risky ways.

When you work on an isolated branch, you’re causing others to not know how you’re changing the code base. And they don’t get to see it or work with it until you’re done. If you refactor anything and others are depending on the current version of that code in their branch, you are directly causing them pain if you merge before they do.

I know working with branches and Git Worktrees feel very productive and efficient, but there are hidden costs. It’s a trap when viewed throught the lens of the team. It makes you think about only your work and not think about the whole.

Git Worktrees are bandaid on top of branches. When you work in too large of chunks, you will be interrupted and need to work on something else mid-work, so you need yet another tool because your existing tools aren’t sufficient.

Continuous Integration, and the discipline required to work in small, safe ways, removes the need for all this.

It gets your code changes into main faster so others can build off of it. If there’s a conflict, it’s noticed sooner, and it signals who you need to talk to before proceeding. It prevents the rework and frustration that comes from late merges.