简体   繁体   English

永久忽略对跟踪文件的本地更改

[英]Permanently ignore local changes to tracked files

I have a folder with a template project in my repo. 我的仓库中有一个带有模板项目的文件夹。 After push, the folder was added to .gitignore. 推送后,文件夹被添加到.gitignore。 This works great regarding new files, but it still tracks modified ones. 这适用于文件,但它仍然跟踪修改过的文件。

I know about the option to ignore changes locally with 我知道在本地忽略更改的选项

git update-index --assume-unchanged

but I want both new and modified files to be ignored for all users of the repo. 但是我想要为repo的所有用户忽略文件和修改过的文件。

How can i make git ignore the modified files, preferrably set in .gitignore? 我如何让git忽略修改后的文件,最好设置在.gitignore中?

您可以使用.gitignore忽略文件,使用update-index --assume-unchanged来忽略版本化文件

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM