git Submodules详解

使用git diff时提示我

➜  nomad git:(master) ✗ $ git diff
diff --git a/sidecar b/sidecar
--- a/sidecar
+++ b/sidecar
@@ -1 +1 @@
-Subproject commit 16c10617666769520a9d4ae6363f97350960a329
+Subproject commit 16c10617666769520a9d4ae6363f97350960a329-dirty

这里有解释:http://stackoverflow.com/questions/4873980/git-diff-says-subproject-is-dirty

解决办法是:
git submodule foreach --recursive git checkout .


这里是git submodule详解:
http://longair.net/blog/2010/06/02/git-submodules-explained/

你可能感兴趣的:(git Submodules详解)