Jump to the navigation menu

Optimise for revertability

There are two things I avoid when merging changes in Git.

Merge commits and squashing commits.

Both make it hard to revert changes if needed once they've been merged, such as a major bug in production and you quickly need to roll back.

Merge commits are difficult to revert and if a commit has been squashed into one larger commit, you can't revert it without also reverting everything else.

Working with small, unsquashed commits makes it simple to revert a specific one and only that one.

If I need to revert something, I want to be able to do as simply and specifically as possible.

Optimise for revertability.

- Oliver

Was this interesting?

Sign up here and get more like this delivered straight to your inbox every day.

About me

Picture of Oliver

I'm an certified Drupal Triple Expert with 18 years of experience, a Drupal core contributor, public speaker, live streamer, and host of the Beyond Blocks podcast.