与.git/info/exclude相反-包括.gitignore排除的文件 [英] Opposite of .git/info/exclude - including files that are excluded by .gitignore
问题描述
是否可以包含项目.gitignore文件明确排除的文件?与.git/info/exclude清单如何在不受版本控制的情况下排除文件类似,我想还原.gitignore所做的排除,以便可以看到这些文件中的更改.
Is there a way to include files specifically excluded by a projects .gitignore file? Similar to how .git/info/exclude listings exclude files while not being under version control I want to revert exclusions done by .gitignore so I can see changes in these files.
推荐答案
不包括.gitignore
中的文件,文件有四种状态:
Excluding files in .gitignore
, there are four status of files:
- 未跟踪
- 已删除
- 上演但已修改
- 上演没有变化
因此您可以使用git ls-files -o
查看未跟踪的文件,git ls-files -d
查看上次操作删除的文件,git ls-files -m
查看修改的文件,以及git ls-files -s
查看已暂存的文件
so you can use git ls-files -o
to view untracked files, git ls-files -d
to view deleted files by the last operation, git ls-files -m
to view modified files, and git ls-files -s
to view files have been staged
这篇关于与.git/info/exclude相反-包括.gitignore排除的文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!