Sometimes you did make a commit, but forget to add the ticket number into the commit message, or realized that the commit message is incorrect or contains some spelling mistakes. In git, you can easily change the last commit message without changing any files, just with one line.
git --amend -m "your new commit message"
if you will not provide -m flag and text message you will have to type a new message in Vim
git --amend
Alex Shapovalov is an independent contractor and founder of Yaplex – a Canadian custom software development company. Alex is a seasoned full-stack Software Developer who provides software development services in Canada and the USA.