Files
git/Documentation
Nicolas Morey-Chaisemartin 9db31bdf5c submodule: Add --force option for git submodule update
By default git submodule update runs a simple checkout on submodules that
are not up-to-date. If the submodules contains modified or untracked
files, the command may exit sanely with an error:

  $ git submodule update
  error: Your local changes to the following files would be overwritten by
  checkout:
	  file
  Please, commit your changes or stash them before you can switch branches.
  Aborting
  Unable to checkout '1b69c6e55606b48d3284a3a9efe4b58bfb7e8c9e' in
  submodule path 'test1'

In order to reset a whole git submodule tree, a user has to run first 'git
submodule foreach --recursive git checkout -f' and then run 'git submodule
update'.

This patch adds a --force option for the update command (only used for
submodules without --rebase or --merge options). It passes the --force
option to git checkout which will throw away the local changes.

Signed-off-by: Nicolas Morey-Chaisemartin <nmorey@kalray.eu>
Acked-by: Jens Lehmann <Jens.Lehmann@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-04-04 10:50:50 -07:00
..
2009-10-01 08:21:35 -04:00
2011-04-03 12:58:23 -07:00
2009-04-06 00:27:09 -07:00
2011-01-04 11:23:42 -08:00
2011-01-04 11:23:42 -08:00
2010-07-20 16:52:53 -07:00
2010-12-16 16:36:03 -08:00
2010-10-13 20:20:09 -07:00
2010-12-19 17:49:42 -08:00
2010-12-08 11:24:12 -08:00
2010-11-23 12:15:43 -08:00
2010-12-07 13:13:21 -08:00
2010-12-10 16:36:53 -08:00
2010-11-09 09:42:57 -08:00
2010-02-14 18:23:16 -08:00
2011-02-11 14:39:55 -08:00
2011-01-04 11:23:42 -08:00
2010-07-05 13:39:02 -07:00
2010-11-24 15:13:58 -08:00
2010-07-20 16:59:17 -07:00