How to Modify Existing Unpushed Commit Messages
Scenario A: Long New Commit Message
1
$ git commit --amend
The above command will:
- open your editor
- allow you to change the commit message of the most recent commit
Scenario B: Short New Commit Message
1
$ git commit --amend -m "New commit message"
The above command will:
- update the commit message of the most recent commit