#interactive-git

My approach to edditing a commit message is to do an interactive rebase with the command git rebase -i HEAD~3.

This allows to change all commit until the specified commit (in this case 3 commits behind head, you can also give the SHA-1 hash of a commit instead of a number behind HEAD.

Afterwards, notepad opens where the commits are shown in order. There you can edit all commit messages as well as squash commits into the previous.

A more detailed description can be found here [1]

https://www.sitepoint.com/git-interactive-rebase-guide/

Subscribe to #interactive-git