X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;ds=sidebyside;f=Documentation%2Fuser-manual.txt;h=fe6fb722da1a5c288c7ae3757622aac8cac79a73;hb=6954ef206343d366c365f5946caa967f92d7bab1;hp=b169836684a56aae176875effa5cc4e6a619de80;hpb=410e99fadf25b65b70d9bf90fd8bd5a5d1ea3c8a;p=git.git diff --git a/Documentation/user-manual.txt b/Documentation/user-manual.txt index b16983668..fe6fb722d 100644 --- a/Documentation/user-manual.txt +++ b/Documentation/user-manual.txt @@ -1196,7 +1196,7 @@ the time, you will want to commit your changes before you can merge, and if you don't, then linkgit:git-stash[1] can take these changes away while you're doing the merge, and reapply them afterwards. -If the changes are independant enough, Git will automatically complete +If the changes are independent enough, Git will automatically complete the merge and commit the result (or reuse an existing commit in case of <>, see below). On the other hand, if there are conflicts--for example, if the same file is @@ -3640,6 +3640,26 @@ Did you forget to 'git add'? Unable to checkout '261dfac35cb99d380eb966e102c1197139f7fa24' in submodule path 'a' ------------------------------------------------- +In older git versions it could be easily forgotten to commit new or modified +files in a submodule, which silently leads to similar problems as not pushing +the submodule changes. Starting with git 1.7.0 both "git status" and "git diff" +in the superproject show submodules as modified when they contain new or +modified files to protect against accidentally committing such a state. "git +diff" will also add a "-dirty" to the work tree side when generating patch +output or used with the --submodule option: + +------------------------------------------------- +$ git diff +diff --git a/sub b/sub +--- a/sub ++++ b/sub +@@ -1 +1 @@ +-Subproject commit 3f356705649b5d566d97ff843cf193359229a453 ++Subproject commit 3f356705649b5d566d97ff843cf193359229a453-dirty +$ git diff --submodule +Submodule sub 3f35670..3f35670-dirty: +------------------------------------------------- + You also should not rewind branches in a submodule beyond commits that were ever recorded in any superproject.