• Home /
  • Blog /
  • How to change last commit message in Git
Git Tutorials

How to change last commit message in Git

Sometimes you did make a commit, but forget to add ticket number into commit message, or realized than commit message is incorrect or contain some spelling mistakes. In git you can easily change 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

Comments

Yaplex - Freelance developer - white logo on black background

Yaplex is an IT Consulting and .NET development company co-founded by freelance developer Alex Shapovalov who lives in Canada and provides software development services in Canada, USA and all over the world.

Contact Information

Toronto, Canada
Phone: +1 647 328 3809
Email: alex@yaplex.com