我能否获得标记为 - 未修改的文件列表? [英] Can I get a list of files marked --assume-unchanged?
问题描述
我标记为 - 承担 - 不变
?有什么方法可以找出我使用该选项隐藏的内容吗?
我已经通过 .git /
目录,并没有看到任何看起来像我期望的东西,但它必须在某个地方。我几个星期前就忘记了这种方式,现在我需要为未来的开发人员记录这些细节。
git ls-files -v
。如果打印的字符是小写字母,则文件被标记为假定不变。 只打印未更改的文件可使用:
git ls-files -v | grep'^ [[:lower:]]'
为了拥抱你的懒惰程序员,把它变成 git别名。编辑您的 .gitconfig
文件以添加此片段:
[别名]
忽略=!git ls-files -v | grep^ [[:lower:]]
现在输入 git ignore
h path / to / ignored.file
h另一个/ ignored.file
What have I marked as --assume-unchanged
? Is there any way to find out what I've tucked away using that option?
I've dug through the .git/
directory and don't see anything that looks like what I'd expect, but it must be somewhere. I've forgotten what I marked this way a few weeks ago and now I need to document those details for future developers.
You can use git ls-files -v
. If the character printed is lower-case, the file is marked assume-unchanged.
To print just the files that are unchanged use:
git ls-files -v | grep '^[[:lower:]]'
To embrace your lazy programmer, turn this into a git alias. Edit your .gitconfig
file to add this snippet:
[alias]
ignored = !git ls-files -v | grep "^[[:lower:]]"
Now typing git ignored
will give you output like this:
h path/to/ignored.file
h another/ignored.file
这篇关于我能否获得标记为 - 未修改的文件列表?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!