2

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. enter image description here 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.enter image description here Please tell me what I need to do while in the terminal or how to set up the editor for such messages.

Ôrel
  • 7,044
  • 3
  • 27
  • 46
LAMBARZOL
  • 23
  • 3
  • 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 Answers2

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