0 votes
1 view
in Devops and Agile by (20.3k points)

I wrote the wrong thing in a commit message.

How can I change the message? The commit has not been pushed yet.

1 Answer

0 votes
by (115k points)

You can use the command "git commit --amend' to overwrite the last commit. If you would like to also overwrite the files, you can use the following command:

git commit -a --amend -m "My new commit message"

Also, check out this Git Tutorial to know more.

Welcome to Intellipaat Community. Get your technical queries answered by top developers !


Categories

...