Change last committed commit message

After using the command to set, commit and click all, I immediately asked the Git command here to make all the changes, including deleted or created files , I typed the wrong message, and then moved it to my Github account. I am the only participant in my repo, so there is no fear of fear.

I followed the advice given here Changing the git commit message after clicking (assuming no one has removed from the remote) and here Change the invalid commit message in git that was already pressed , which is basically what to do:

git commit --amend

which opens my text editor (Sublime) displaying the message of the last commit. After that, I change this message, save and close the file. After that I type:

git push origin master --force

which is working fine. But if I do a now:

git log

I keep seeing the wrong (i.e.: old) post in my last commit, and my Github account does not show any changes. What am I doing wrong?

0
source share
1 answer

In my experience, Sublime does not work well with git propmts. Try sending the correct message directly with

git commit --amend -m <message>

and see if it works.

If possible, you will have to switch to gVim or some other editor that uses one process.

, Sublime Text, , . - git , , .

+2

All Articles