Rewriting and Squashing Git Commits with Magit

I use Magit all the time and really like it but I don't know how to do much more than stage and commit changes. Sometimes I can even resolve a merge conflict but I always have to stumble through it. As a result, I'm always on the lookout for Magit tutorials that help me get better at using it.

My latest find is a post by Shingo Fukuyama on using Magit to rewrite git commit messages. Fukuyama has lots of screen shots to show you what you'll see as you follow the steps he lays out.

In the same vein, Howard Abrams has a similar tutorial on using Magit to squash commits together. The process is very much like the one that Fukuyama describes for rewriting commit messages. I really like articles like these; they help me extend my Magit knowledge in a relatively painless way.

This entry was posted in General and tagged , . Bookmark the permalink.
  • Adam Spiers

    Those are nice posts, but both neglect to an incredibly useful feature of recent versions of magit: when you press 'c' for commit, you can then press 'r' to reword a commit, or 's' to mark the commit for autosquashing into another commit on the next rebase, or 'f' for a similar approach using git's fixup! trick ...