• 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
Yaplex - Freelance developer - white logo on black background

Yaplex ® is a custom software development company located in Mississauga, Ontario. Yaplex was founded in 2013 and provides website development, mobile development, and custom .NET software development services.

Contact Information

Mississauga, ON, Canada
Phone: +1 647 328 3809
Email: hello@yaplex.com