git 取消/添加 某文件的跟踪

如果我们不小心将某个文件加入了 git 版本控制,但是突然又不想继续跟踪控制这个文件了,怎么办呢?

使用 git update-index 即可。

不想继续追踪某个文件

git update-index --assume-unchanged your_file_path

如果想再次继续跟踪某个文件

git update-index --no-assume-unchanged your_file_path
原文地址:https://www.cnblogs.com/debmzhang/p/4146106.html