The aim of this how-to-guide🏁 is to show how to fast edit the last commit message.

1. steps/?

  • the last commit can be amended just with running git commit --amend
  • first, I am getting
▶ git commit --amend
hint: Waiting for your editor to close the file... "C:\Users\Admin\AppData\Local\Programs\Microsoft VS Code\Code.exe" --wait: C:\Users\Admin\AppData\Local\Programs\Microsoft VS Code\Code.exe: No such file or directory
error: There was a problem with the editor '"C:\Users\Admin\AppData\Local\Programs\Microsoft VS Code\Code.exe" --wait'.
Please supply the message using either -m or -F option.
  • problem is that the path is incorrect
  • run code --version in the same folder as your git repo
    • make sure it works
▶ code --version
  • run git config --global core.editor "code --wait"
  • run git commit --amend
  • VSCode should start and show COMMIT_EDITMSG file

2. sources