Skip to content

Commit

Permalink
user-manual: Flesh out uncommitted changes and submodule updates
Browse files Browse the repository at this point in the history
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 <wking@tremily.us>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
W. Trevor King authored and Junio C Hamano committed Feb 19, 2013
1 parent ae6ef55 commit 9148673
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Documentation/user-manual.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3739,7 +3739,9 @@ module a

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

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

[[low-level-operations]]
Low-level git operations
Expand Down

0 comments on commit 9148673

Please sign in to comment.