Let’s say I have 3 unpushed commits. Now I want to change the commit message of the first or second commit (changing them for the third one is simple using git commit --amend). How to do that?
Let’s say I have 3 unpushed commits. Now I want to change the commit
Share
To rebound on the sub-question: is there a
git commit --amendfor a previous commit (and not just the last one), you could try something like (not tested yet, but Colin O’Dell mentions in the comments having written a script for it colinodell/git-amend-old):That would be like: