当Git(我认为是1.6.x发布版)意识到子模块内部的变化时。这只会让我烦恼:
$ git status vendor | grep modified:
# modified: vendor/rails (modified content)
$ git diff vendor/
diff --git a/vendor/rails b/vendor/rails
--- a/vendor/rails
+++ b/vendor/rails
@@ -1 +1 @@
-Subproject commit 046c900df27994d454b7f906caa0e4226bb42b6f
+Subproject commit 046c900df27994d454b7f906caa0e4226bb42b6f-dirty
请让它停下来?
发布于 2018-03-26 14:38:56
ignore = dirty
因此git 1.7.2已经退出,并包括--ignore-submodules
可供选择的status
.
从git help status
:
--ignore-submodules[=<when>]
Ignore changes to submodules when looking for changes.
<when> can be either "untracked", "dirty" or "all", which
is the default. When "untracked" is used submodules are
not considered dirty when they only contain untracked
content (but they are still scanned for modified content).
Using "dirty" ignores all changes to the work tree of
submodules, only changes to the commits stored in the
superproject are shown (this was the behavior before
1.7.0). Using "all" hides all changes to submodules (and
suppresses the output of submodule summaries when the
config option status.submodulesummary is set).
我想要的价值是dirty
.
git status --ignore-submodules=dirty
我使用化名是因为我懒惰:
alias gst='git status --ignore-submodules=dirty'
https://stackoverflow.com/questions/-100007783
复制相似问题