- 不用
/.gitignore
忽略文件- 修改
.git/info/exclude
文件 - 如果已经有改动文件,
git update-index --skip-worktree [<file>...]
- 参考链接 https://stackoverflow.com/questions/1753070/how-do-i-configure-git-to-ignore-some-files-locally
- 修改
/.gitignore
忽略文件.git/info/exclude
文件git update-index --skip-worktree [<file>...]