I am learning how to work with Git. On windows with VS Code. I am learning merge with conflicts. After resolving commit conflicts, I will see an auto-generated commit message containing a list of conflicting files. It opens automatically in the built-in GIT terminal. There is nothing more I can do. I press :q or :wq it does not work. Everywhere they write that you just need to save, I don't know how to do it.
I saw on YouTube how one person opens a separate window in VS Code in which he can save this message and work further, but there is no way to set it up.
Please tell me what I need to do while in the terminal or how to set up the editor for such messages.
Asked
Active
Viewed 1,526 times
2
-
What do you mean with "I press :q or :wq it does not work"? Isn't a merge commit created with the message "Merge branch 'v1'"? (Write `git show` to see the last commit.) What do you want to happen? – md2perpe Dec 20 '21 at 21:01
2 Answers
0
Check first your git config --global core.editor
value.
I have set mine to "%LOCALAPPDATA%\Programs\Microsoft VS Code\bin\code" --wait
That should avoid vim
, which is not well supported in the included Terminal console of VSCode.

VonC
- 1,262,500
- 529
- 4,410
- 5,250
0
Open VS Code for any type of Git message (e.g. git merge/git commit etc.) -
git config --global core.editor 'code --wait'
Open VS Code for diff tool -
git config --global diff.tool vscode
Open VS Code for merge tool -
git config --global merge.tool vscode
For more check this life-saving article - https://www.roboleary.net/vscode/2020/09/15/vscode-git.html

Pinaki
- 792
- 8
- 17