如何判断哪些文件被标记为“假定未更改"?在git中 [英] How can I tell which files have been marked as "assume unchanged" in git

查看:82
本文介绍了如何判断哪些文件被标记为“假定未更改"?在git中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

此答案向您展示了如何将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!

注意:在下面的评论中提到, 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文件-v |grep ^ [a-z]

这篇关于如何判断哪些文件被标记为“假定未更改"?在git中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆