Code Premix

How to change unpushed commit message in Git

📅December 27, 2021
🗁Git

Today we’ll show you how to change unpushed commit message in Git. This is a small article but very useful for those who work with Git.

git commit --amend

After executing the command, Editor will be auto open where you can change the commit message then save and close it.

You can also change the commit message directly in the command line.

git commit --amend -m "Write your new commit message"

That’s it for today.
Thank you for reading. Happy Coding..!!