This content originally appeared on DEV Community and was authored by Elhabib Soufain
Changing the Most Recent Commit
The git commit --amend command allows you to change the most recent commit message.
Not pushed commit
To change the message of the most recent commit that has not been pushed to the remote repository, commit it again using the --amend flag.
1: Navigate to the repository directory in your terminal.
2: Run the following command to amend (change) the message of the latest commit:
git commit --amend -m "New commit message."
This content originally appeared on DEV Community and was authored by Elhabib Soufain
Elhabib Soufain | Sciencx (2021-09-13T09:35:12+00:00) How to change commit message. Retrieved from https://www.scien.cx/2021/09/13/how-to-change-commit-message/
Please log in to upload a file.
There are no updates yet.
Click the Upload button above to add an update.