如何撤消git update-index?

tim*_*son 23 git github gitignore git-index

我只是做了以下操作,以便在我的localhost和我的生产环境中保留config.php文件的不同副本:

$ git update-index --assume-unchanged application/config/config.php
Run Code Online (Sandbox Code Playgroud)

不幸的是,我并没有完全写入config.php文件,我应该和我需要扭转这种,这样我可以做出改变,提交它,然后重新忽略该文件.

如何撤消git update-index命令?

Cha*_*esB 34

git update-index --no-assume-unchanged application/config/config.php
Run Code Online (Sandbox Code Playgroud)

注意--no前缀,风格上是双重否定.

  • 同样的逻辑适用于`--skip-worktree`,所以使用`--no-skip-worktree` (3认同)