gpt4 book ai didi

mercurial - 防止 "hg status"显示未跟踪目录下的所有内容

转载 作者:行者123 更新时间:2023-12-03 06:36:54 25 4
gpt4 key购买 nike

我发现对于未跟踪的目录,hg status 的输出过于冗长。假设我有一个由 git 和 hg 管理的空存储库。所以会有两个目录,.git.hg

git status 的输出是:

# Untracked files:
# (use "git add <file>..." to include in what will be committed)
#
# .hg/

hg status 的输出是:

? .git/HEAD
? .git/config
? .git/description
? .git/hooks/applypatch-msg.sample
? .git/hooks/commit-msg.sample
? .git/hooks/post-commit.sample
? .git/hooks/post-receive.sample
? .git/hooks/post-update.sample
? .git/hooks/pre-applypatch.sample
? .git/hooks/pre-commit.sample
? .git/hooks/pre-rebase.sample
? .git/hooks/prepare-commit-msg.sample
? .git/hooks/update.sample
? .git/info/exclude

有没有办法将其输出减少到类似以下行的内容?

? .git/

最佳答案

这对我有用:

hg status -q

Option -q/--quiet hides untracked (unknown and ignored) files unless explicitly requested with -u/--unknown or -i/--ignored.

关于mercurial - 防止 "hg status"显示未跟踪目录下的所有内容,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2521197/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com