Skip to main content

Easily amend commits with git-instafix

How often do you make commits to a Git branch to later realise that you need to amend one of your unpushed commits?

A simple git commit --amend will only work on the most recent commit, so that won't work if you've added more commits after the one you want to amend.

You can make a temporary commit, rebase your branch and squash the temporary commit into the original one.

Or you can use git-instafix - a tool for easily fixing and amending old commits.

Instead of making a temporary commit, running git-instafix will show your unpushed commits - allowing you to select one and it will amend it for you in a single step, making it easier to keep your Git commit history cleaner and easier to read and review.

Was this interesting?

Subscribe to my daily newsletter for software professionals on software development and delivery, Drupal, DevOps, community, and open-source.

About me

Picture of Oliver

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