[英]How can I tell which files have been marked as “assume unchanged” in 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. 这个答案向您展示了如何将由git管理的文件标记为“我不希望从该文件的repo中进行更改” - IE具有您自己的本地未跟踪版本的该文件,即使它仍然受到版本控制在遥控器中的git。
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! ...如果你正在使用这个功能,那么能够检查是件好事!
Note: mentioned in comments below, skip-worktree
is probably a better tool for the job than assume-unchanged
. 注意:在下面的评论中提到, skip-worktree
可能是一个比assume-unchanged
更好的工作更好的工具。 Nonetheless, this question documents how to find assume-unchanged
files. 尽管如此,这个问题记录了如何找到assume-unchanged
文件。
Slight improvement to @GreenAsJade answer: 对@GreenAsJade的轻微改进回答:
git ls-files -v | grep "^[a-z]"
That works for zsh users. 这适用于zsh用户。
... the answer was provided in comments of the answer linked above: git ls-files -v
will show "assume unchanged" files as lower case letter. ...答案在上面链接的答案的评论中提供: git ls-files -v
将“假设未更改”文件显示为小写字母。
So you can find them like this: 所以你可以这样找到它们:
git ls-files -v | grep ^[az]
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.