DEV Community

Cover image for Renaming Git Commit Messages: A Quick and Easy Guide

Renaming Git Commit Messages: A Quick and Easy Guide

Pradumna Saraf on July 06, 2023

In Git, it's common to realize that the last commit message needs modification. Whether it's a typo or missing information, Git provides a simple s...
Collapse
 
agusrdz profile image
Agustín Rodríguez •

Good explanation, one thing I do different is use git push --force-with-lease instead of the regular force in order to avoid rewrite whole history from my teammates.

Collapse
 
samuelfaure profile image
Samuel-Zacharie FAURE •

Agreed, I use --force-with-lease 200 times for every 1 time when I'll actually want --force

Collapse
 
pradumnasaraf profile image
Pradumna Saraf •

Thank you.

Collapse
 
bradpendley profile image
Brad Pendley •

Nicely done! This is also useful for coauthors to add their messages through commit trailers.

Collapse
 
pradumnasaraf profile image
Pradumna Saraf •

Thank you, Brad

Collapse
 
efrenmarin profile image
Efren Marin •

Yes, I was thinking the exact same thing!

Collapse
 
gerimate profile image
Greg Mate •

Very useful when you forget that you should follow conventional commits

Collapse
 
pradumnasaraf profile image
Pradumna Saraf •

Haha. I agree. Thank you.

Collapse
 
matek075 profile image
Matek •

Briefly and succinctly

Collapse
 
pradumnasaraf profile image
Pradumna Saraf •

Thank you.

Collapse
 
vishnusatheesh profile image
Vishnu Satheesh •

Nice Explanation.

Collapse
 
pradumnasaraf profile image
Pradumna Saraf •

Thank you.

Collapse
 
kurealnum profile image
Oscar •

That's really useful and simple to do! Definitely using this next time I screw up a commit message.

Collapse
 
mannu profile image
Manpreet Singh •

Good Explanation.

Collapse
 
pradumnasaraf profile image
Pradumna Saraf •

Thank you.

Collapse
 
slodhimantras profile image
SLodhiMantras • • Edited

good explanation

Collapse
 
pradumnasaraf profile image
Pradumna Saraf •

Thank you.

Collapse
 
bullbiased profile image
Bull •

Pretty cool, blog

Collapse
 
pradumnasaraf profile image
Pradumna Saraf •

Thank you.