1

I've used git commit --amend to rename a git commit. After struggling how to even write anything (I'm using Terminal or Terminal in Visual Studio Code) I think I accidentally discovered that pressing a allows you to write.

I now have the name I want to save the commit as ('css reset'). I literally just do not know how what to do next. Why aren't there instructions?

enter image description here

tonitone120
  • 1,920
  • 3
  • 8
  • 25
  • Yep that worked hadn't used that `:wq` command in a while. Going to write down this method as a potential technique for future editing – tonitone120 Mar 12 '21 at 22:10

1 Answers1

2

It's probably opening the commit message in vi. Use ESC to return to Normal mode, then use :wq to save and quit.

You can change what editor git uses with git config --global core.editor <new editor>.

0x5453
  • 12,753
  • 1
  • 32
  • 61
  • 1
    Alternatively learn just enough `vi` to get by. It isn't that hard, and in fact it's kind of fun once you get the hang of it. :) – matt Mar 12 '21 at 22:11