From 3d25d7746e8b6d192f2ed0c4d7b54e1fcee49de7 Mon Sep 17 00:00:00 2001 From: Adrien Ollier Date: Mon, 20 Jul 2020 09:00:54 +0200 Subject: [PATCH] removes trailing spaces --- book/07-git-tools/sections/submodules.asc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/book/07-git-tools/sections/submodules.asc b/book/07-git-tools/sections/submodules.asc index 442fb85a6..a832bdedd 100644 --- a/book/07-git-tools/sections/submodules.asc +++ b/book/07-git-tools/sections/submodules.asc @@ -373,7 +373,7 @@ Submodule DbConnector c3f01dc..c87d55d: > better connection routine ---- -Git will by default try to update *all* of your submodules when you run `git submodule update --remote`. +Git will by default try to update *all* of your submodules when you run `git submodule update --remote`. If you have a lot of them, you may want to pass the name of just the submodule you want to try to update. ===== Pulling Upstream Changes from the Project Remote @@ -969,7 +969,7 @@ nothing to commit, working tree clean ---- Using the `--recurse-submodules` flag of `git checkout` can also be useful when you work on several branches in the superproject, each having your submodule pointing at different commits. -Indeed, if you switch between branches that record the submodule at different commits, upon executing `git status` the submodule will appear as ``modified'', and indicate ``new commits''. +Indeed, if you switch between branches that record the submodule at different commits, upon executing `git status` the submodule will appear as ``modified'', and indicate ``new commits''. That is because the submodule state is by default not carried over when switching branches. This can be really confusing, so it's a good idea to always `git checkout --recurse-submodules` when your project has submodules.