Dropbox + VSCode: index file changed

August 22, 2018

在两台机器上同时用 VSC 打开一个 git 中的文件时,会不断弹出 index file changed 的提示,这是因为 VSC 会自动 autofetch 来检查整个仓库,这个过程会改动 .git/index 这个文件,解决方法有两个:

  1. 更新使两台机器的 git 版本一致后正常,推测 git fetch 后会将版本信息保存到 index 中。
  2. 或者直接禁用 autofetch:"git.autofetch": false

Reference


Profile picture

Written by Armin Li , a venture capitalist. [Weibo] [Subscribe]