• 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 a custom software development company co-founded by full-stack .NET Software developer Alex Shapovalov who lives in Mississauga, ON and provides software development services in Mississauga and GTA.

Contact Information

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