我可以获得标记为 --assume-unchanged 的​​文件列表吗? [英] Can I get a list of files marked --assume-unchanged?

查看:31
本文介绍了我可以获得标记为 --assume-unchanged 的​​文件列表吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我将什么标记为 --assume-unchanged?有什么方法可以使用该选项找出我隐藏的内容吗?

What have I marked as --assume-unchanged? Is there any way to find out what I've tucked away using that option?

我已经翻遍了 .git/ 目录,并没有看到任何看起来像我期望的东西,但它一定在某个地方.我已经忘记了几周前我以这种方式标记的内容,现在我需要为未来的开发人员记录这些详细信息.

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.

推荐答案

您可以使用 <代码>git ls-files -v.如果打印的字符是小写,则文件被标记为假定未更改.

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:]]'

为了拥抱你的懒惰程序员,把它变成一个 git 别名.编辑您的 .gitconfig 文件以添加以下代码段:

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:]]"

现在输入 gitignore 会给你这样的输出:

Now typing git ignored will give you output like this:

h path/to/ignored.file
h another/ignored.file

这篇关于我可以获得标记为 --assume-unchanged 的​​文件列表吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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