问题描述
此答案向您展示了如何将git管理的文件标记为我不想更改此文件的存储库"-IE拥有该文件的本地未跟踪版本,即使该文件仍受git在遥控器中的版本控制.
This answer shows you how to mark a file that is managed by git as "I don't want changes from the repo for this file" - IE to have your own local untracked version of that file, even though it remains under revision control by git in the remotes.
问题是如何辨别以这种方式标记了哪些文件?" ...如果您正在使用此功能,那将是一件好事!
The question is "How can I tell which files have been marked this way?" ... a good thing to be able to check, if you are using this feature!
注意:在下面的评论中提到,与assume-unchanged
相比,skip-worktree
可能是更好的工作工具.但是,此问题记录了如何查找assume-unchanged
文件.
Note: mentioned in comments below, skip-worktree
is probably a better tool for the job than assume-unchanged
. Nonetheless, this question documents how to find assume-unchanged
files.
推荐答案
...上面链接的答案的注释中提供了答案:git ls-files -v
将显示假定未更改"的文件为小写字母.
... the answer was provided in comments of the answer linked above: git ls-files -v
will show "assume unchanged" files as lower case letter.
所以您可以这样找到它们:
So you can find them like this:
git ls-files -v | grep ^[a-z]
这篇关于我如何知道哪些文件已标记为“假定未更改"?在git中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!