git merge master时报错 hint: Waiting for your editor to close the file...

时间:2025-04-07 15:39:49

在拉取远端新代码时报错 如下:

hint: Waiting for your editor to close the file... "D:\vs code\Microsoft VS Code\_\" --wait: D:\vs code\Microsoft VS Code\_\: No such file or directory
error: There was a problem with the editor '"D:\vs code\Microsoft VS Code\_\" --wait'.
Not committing merge; use 'git commit' to complete the merge.

解决方法如下:

执行: git config --global 'code --wait'

知识补充:

拉取远端主分支最新代码时,步骤如下:

跳转到master分支

git checkout master

接着执行: 

git fetch
git merge

跳转回自己的分支 例如div分支

git checkout dev
git merge master