VSCode资源管理器不更新Git文件更改指示器(已修改/未跟踪)

huangapple go评论136阅读模式
英文:

VSCode Explorer doesn't update Git file change indicators (Modfied/Untracked)

问题

在提交所有已修改和未跟踪的文件后("nothing to commit, working tree clean"),VSCode不会更新其资源管理器界面以指示文件不再被修改/未跟踪。我必须重新加载窗口以使过时的MU指示消失。

情况

  • 我的计算机(MacOS)
    • 特定的有问题的Git仓库 --> 出现问题。
    • 不同远程Git仓库的克隆 --> 没有问题。
    • 本地新初始化的Git仓库 --> 出现问题。
  • 另一台计算机(Windows) --> 没有问题。
  • 另一台计算机(MacOS) --> 没有问题。

尝试

  • 我尝试重新安装VSCode,但问题仍然存在。

环境

  • VSCode:1.76.2
    • 同样的设置同步在"我的计算机"和"另一台计算机"上。
  • Git:2.40.0
  • 系统:MacOS Apple Silicon
  • 除了以下一些例外,使用默认设置。

VSCode settings.json

{
  "workbench.colorTheme": "Atom One Dark",
  "workbench.iconTheme": "material-icon-theme",
  "files.autoSave": "afterDelay",
  "editor.tabSize": 2,
  "editor.wordWrap": "on",
  "editor.formatOnSave": true,
  "editor.defaultFormatter": "esbenp.prettier-vscode",
  "editor.codeActionsOnSave": {
    "source.fixAll.eslint": true
  },
  "[markdown]": {
    "editor.wrappingIndent": "same"
  },
  "prettier.bracketSameLine": true,
  "remote.SSH.connectTimeout": 60,
  "remote.SSH.remotePlatform": {
    "ubuntu-VirtualBox": "linux"
  },
  "remote.SSH.showLoginTerminal": true,
  "remote.SSH.useLocalServer": false,
  "window.zoomLevel": 1
}

Git配置

credential.helper=osxkeychain
user.email=blah
user.name=blah
core.editor=code --wait
core.repositoryformatversion=0
core.filemode=true
core.bare=false
core.logallrefupdates=true
core.ignorecase=true
core.precomposeunicode=true

编辑 1:包括更多设置内容。
编辑 2:整理问题。

英文:

After committing all modified and untracked files (nothing to commit, working tree clean), VSCode does not update its explorer UI to indicate that the files are no longer modified/untracked. I have to reload the window to make the outdated M, U indicators go away.

Situation

  • My machine (MacOS)
    • The particular problematic git repository --> problem occurs.
    • Clone of a different remote git repository --> problem doesn't occur.
    • Newly initialized git repository on local --> problem occurs.
  • Another machine (Windows) --> problem doesn't occur.
  • Another machine (MacOS) --> problem doesn't occur.

Attempt

  • I tried reinstalling VSCode but the problem still remains.

Environment

  • VSCode: 1.76.2
    • Same settings sync on both "My machine" and "Another machine".
  • Git: 2.40.0
  • System: MacOS Apple Silicon
  • Default settings aside from some execeptions below.

VSCode settings.json

{
  "workbench.colorTheme": "Atom One Dark",
  "workbench.iconTheme": "material-icon-theme",
  "files.autoSave": "afterDelay",
  "editor.tabSize": 2,
  "editor.wordWrap": "on",
  "editor.formatOnSave": true,
  "editor.defaultFormatter": "esbenp.prettier-vscode",
  "editor.codeActionsOnSave": {
    "source.fixAll.eslint": true
  },
  "[markdown]": {
    "editor.wrappingIndent": "same"
  },
  "prettier.bracketSameLine": true,
  "remote.SSH.connectTimeout": 60,
  "remote.SSH.remotePlatform": {
    "ubuntu-VirtualBox": "linux"
  },
  "remote.SSH.showLoginTerminal": true,
  "remote.SSH.useLocalServer": false,
  "window.zoomLevel": 1
}

Git Configurations

credential.helper=osxkeychain
user.email=blah
user.name=blah
core.editor=code --wait
core.repositoryformatversion=0
core.filemode=true
core.bare=false
core.logallrefupdates=true
core.ignorecase=true
core.precomposeunicode=true

Edit 1: included more settings content.
Edit 2: organized question.

答案1

得分: 0

问题的原因是我的工作目录路径包含一个名为韩文的文件夹。我将其更改为英文,问题就解决了。这与任何配置无关。

对于使用其他语言的人,请注意这一点!

英文:

The cause of the problem was that the path to my working directory included a folder named in Korean. I changed it to English and it works just fine. It had nothing to do with any sort of configurations.

For anyone using other languages, beware of this!

huangapple
  • 本文由 发表于 2023年3月15日 18:21:44
  • 转载请务必保留本文链接:https://go.coder-hub.com/75743382.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定