让git不要显示未跟踪的文件 [英] Get git not to show untracked files
问题描述
在做 git commit
时,有没有办法在我的编辑器中显示未跟踪的文件(定义在 $ EDITOR
)?我知道如何在shell中执行此操作( git status -uno
),但我希望在编辑器中执行。
请注意,我不想永远忽略这些文件;我只是不希望在某些场合看到它们。
从 pre> When doing Note that I do not want to ignore these files forever; I just don't want to see them on certain occasions. From the git-commit man page:
这篇关于让git不要显示未跟踪的文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
-u [],--untracked-files [=]
显示未跟踪的文件(默认:全部)。
mode参数是可选的,用于指定处理未跟踪的
文件。可能的选项是:
·no - 不显示未跟踪文件
·normal - 显示未跟踪文件和目录
·all - 同时显示个人文件在未跟踪的目录中。
当没有指定该选项时,请参阅git-config(1)获取用于更改
默认值的配置变量。
git commit
, is there a way to not display the untracked files in my editor (defined in $EDITOR
)? I know how to do so in the shell (git status -uno
), but I'd like do it in editor as well.
-u[], --untracked-files[=]
Show untracked files (Default: all).
The mode parameter is optional, and is used to specify the handling of untracked
files. The possible options are:
· no - Show no untracked files
· normal - Shows untracked files and directories
· all - Also shows individual files in untracked directories.
See git-config(1) for configuration variable used to change the default for
when the option is not specified.