GNU/Linux ◆ xterm-256color ◆ bash 3721 views

Git rebase allows us to change the subject and the text of commits (and not just the last one with --amend). Of course one should not do this if the commits have already been published and other people have already used them.

Ex: if you want to change the text for the last two commits, you do

git rebase --interactive HEAD~2

Change pick with reword, save and quit the editor, and git will walk you through rewording the commits. Cool stuff!