How to Change a Git Commit Message

Publié le: 25 novembre 2023
sur la chaîne: Cameron McKenzie
1,667
39

Ever wonder how to change a git commit message after a commit has already been made in the repo?

Don't worry, it's not hard. A simple git commit amend command will allow you to update a Git commit message:

git commit --amend -m "New Git Commit Message"

That's it! That's how easy it is to amend a Git commit message after the fact.

Just know that changing the commit message actually creates a new Git commit, so if you've already pushed to GitHub or GitLab, you might not want to change the commit message, or you might really mess up the Git commit history!


Sur cette page du site, vous pouvez voir la vidéo en ligne How to Change a Git Commit Message durée heure minute seconde en bonne qualité , qui a été Téléchargé par l'utilisateur Cameron McKenzie 25 novembre 2023, Partagez le lien avec vos amis et connaissances, sur youtube cette vidéo a déjà été regardée 1,667 fois et il a aimé 39 téléspectateurs. Bon visionnage!