Error Writing Git Commit Messages With Vi
I typically write my git commit messages in the terminal, but today I wanted to write a multi-line comment so I left out the -m argument to git commit so it would open up my default editor, which is vi:
I wrote my comment, saved and exit but got an error:
1 2 3
A quick google and I found the solution, I thought I’d repost it here for myself as well as others.
There are a couple of solutions offered in that article, for me I just set the full path to vi with a -f flag in my .gitconfig:
As an FYI…if you want to see the values in git config, you can run this command in your project and it will list your global and project configuration: