有没有办法告诉git-status忽略.gitignore文件的影响? [英] Is there a way to tell git-status to ignore the effects of .gitignore files?
问题描述
我已经配置了许多 .gitignore
文件,以从一组约6000个未跟踪文件中过滤掉许多不同的不需要的文件。我希望按照我想要的方式执行 git add。
。
但是,我想暂时禁用 .gitignore
过滤器以查看留下的内容,并确保没有任何重要的意外过滤。
我知道 git-clean
包含一个选项来忽略 .gitignore文件
。对于 git-status
?
有类似的选项,我可以通过并删除所有 .gitignore
文件,做检查,然后恢复它们,但看起来应该有一个更简单的方法? / div>
尝试使用 git ls-files --other
- 它应该列出git不知道的所有文件;即那些不在存储库中并且不被 .gitignore
。
您也可以使用 git ls-files --ignored --exclude-standard
来查看git明确忽略的文件。
I have configured numerous .gitignore
files to filter out many different unwanted files from a set of about 6,000 untracked files. I want to do git add .
when I've got my filtered list looking the way I want it.
But, then I want to disable the .gitignore
filters temporarily to see what got left behind, and make sure there was nothing important accidentally filtered.
I know that git-clean
includes an option to ignore .gitignore files
. Is there a similar option for git-status
?
I could go through and delete all the .gitignore
files, do the check, then restore them, but it seems there should be an easier way?
Try using git ls-files --other
- it should list all files that git doesn't know about; i.e. those files that aren't in the repository and aren't ignored by .gitignore
.
You can also use git ls-files --ignored --exclude-standard
to see what files git is explicitly ignoring.
这篇关于有没有办法告诉git-status忽略.gitignore文件的影响?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!