Photo by [Yancy Min](https://unsplash.com/@yancymin) on [Unsplash](https://unsplash.com)

Git Fixup to the Right Commit, Automatically

Some years ago I was really bored of addressing review comments in a PR and doing the amend to the right commit. It also felt kind of silly to do it manually when the process is quite mechanical and 99% of the time we either amend to the last commit that changed a particular chunk or to the last commit that changed a file. So, I created these git aliases that I ended up sharing with friends and co-workers quite some times already. In case they are useful for anyone else, here they are: ...

July 5, 2026 · 4 min · Rodrigo Campos Catelin