git commit --amendhang on 提示:等待你的编辑器在 vscode 中关闭文件

问题描述 投票:0回答:2

相关文章:在 VSCode 中关闭提交消息文件时,Git 挂起并显示“提示:等待编辑器关闭文件...”

我不喜欢上面链接中的解决方案,因为它创建了一个全新的

vscode
实例。我曾经能够
git commit --amend
,然后当前
vscode
实例中会弹出一个新选项卡,然后我在其中编辑提交消息,保存,然后关闭,然后
 hint: Waiting for your editor to close the file
消失。从今天早上开始,这种情况不再发生,我认为我没有对我的
~/.gitconfig
进行任何更改。

这些是我当前的设置

.gitconfig

[submodule]
    recurse = true
[user]
    name = my_email
    email = my_email
[credential]
    helper = cache --timeout=31536000
[url "https://github.com/"]
  insteadOf = git://github.com/
[alias]
  tree = log --oneline --graph --all --decorate
[core]
    editor = code --wait
[diff]
  tool = vscode
[difftool "vscode"]
  cmd = code -n --wait --diff $LOCAL $REMOTE
[merge]
  tool = vscode
[mergetool "vscode"]
  cmd = code --wait $MERGED

有谁知道这个问题的解决方案吗?

附注我刚刚尝试了链接帖子中的解决方案,其中修改被路由到不同的实例,但这也不起作用。当我关闭新实例时,它仍然挂在

hint: Waiting for....

git visual-studio-code
2个回答
0
投票

我不喜欢这个错误没有得到修复。 我的解决方案:例如,我转到虚拟机并通过 Git GUI 提交。 它会在 Mac 端(即我的项目运行的地方)清除它,而无需重新打开或新实例。


0
投票

我收到了同样的消息,但我使用

nano
作为我的编辑器。事实证明,问题是由于 anaconda 引起的不相关问题,
nano
甚至无法自行运行。

尝试单独运行您使用的任何编辑器,首先排除故障,然后再次尝试提交。

© www.soinside.com 2019 - 2024. All rights reserved.