Git 不再追踪指定文件变化

Updated on with 0 views and 0 comments

一些文件,如配置文件,需要存在,但在本地运行时,需要填入一些敏感信息,因此不想git再追踪这些文件的变化

命令如下:

git update-index --assume-unchanged 文件路径

例:

git update-index --assume-unchanged src\main\resources\application.yml