Konubinix' opinionated web of thoughts

Git Fixup and Interactive Rebase


git fixup and interactive rebase

In one step, use the staged diff to create a commit with message “!fixup some commit” and run git rebase interactive. I use this a lot for I commit a lot and often find out I forgot something in some deep commit I did not push yet. I just have to add the fix and run git-fri to fix my mistake.

This creates much nicer commits that make sense rather than the habit that I see too often of people pushing branches with several “fix”, “typo” in those just because they eventually got too lazy (I am also) to rewrite their history before pushing.

Notes linking here