I cannot set Visual Studio Code as my core editor for git. When I'm trying to do the git commit I only see the info that there is a problem with editor.
MacBook-Air-Agata:~ agataskrzypczyk$ git config --global core.editor "/Applications/Visual Studio Code.app" --wait
MacBook-Air-Agata:~ agataskrzypczyk$ git config --global core.editor
/Applications/Visual Studio Code.app
MacBook-Air-Agata:~ agataskrzypczyk$ cd nowy
MacBook-Air-Agata:nowy agataskrzypczyk$ git commit
hint: Waiting for your editor to close the file... /Applications/Visual Studio Code.app: /Applications/Visual: No such file or directory
error: There was a problem with the editor '/Applications/Visual Studio Code.app'.
Please supply the message using either -m or -F option.
MacBook-Air-Agata:nowy agataskrzypczyk$
The command to do this is git config --global core. editor "nano" . You can change the highlighted section with your editor of choice!
I suggest you to set Visual Studio Code option to be launched from command line. For this follow the instructions in the documentation here.
Then try setting core editor with this command:
git config --global core.editor "code --wait"
And then I think you'll not have problems with git commit
.
git config --global core.editor "code"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With