Skip to content

Commit 9148673

Browse files
wkinggitster
authored andcommitted
user-manual: Flesh out uncommitted changes and submodule updates
If you try and update a submodule with a dirty working directory, you get an error message like: $ git submodule update error: Your local changes to the following files would be overwritten by checkout: ... Please, commit your changes or stash them before you can switch branches. Aborting ... Mention this in the submodule notes. The previous phrase was short enough that I originally thought it might have been referring to the reflog note (obviously, uncommitted changes will not show up in the reflog either ;). Signed-off-by: W. Trevor King <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent ae6ef55 commit 9148673

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Documentation/user-manual.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3739,7 +3739,9 @@ module a
37393739

37403740
NOTE: The changes are still visible in the submodule's reflog.
37413741

3742-
This is not the case if you did not commit your changes.
3742+
If you have uncommitted changes in your submodule working tree, `git
3743+
submodule update` will not overwrite them. Instead, you get the usual
3744+
warning about not being able switch from a dirty branch.
37433745

37443746
[[low-level-operations]]
37453747
Low-level git operations

0 commit comments

Comments
 (0)