• Home /
  • Blog /
  • How to change last commit message in Git
git-tutorials.png

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 new message in Vim

git --amend


Comments

Search

Yaplex logo white text

Yaplex is an IT Consulting and .NET development company co-founded by .NET Developer Alex Shapovalov who lives in Mississauga and provides software development services in Toronto, Mississauga, and GTA.

Contact Information

Toronto, Canada
Phone: +1 647 328 3809