Re: Why do git submodules require manual checkouts and commits?
From: Lars Hjemli <hidden>
Date: 2016-06-15 22:44:37
On Fri, May 16, 2008 at 4:24 PM, Johannes Schindelin [off-list ref] wrote:
On Fri, 16 May 2008, Avery Pennarun wrote:quoted
Think of it this way: I can commit, or not commit, my dirty Makefile at> the same time as everything else (in a single project) with a single > "git commit" line, depending on what I want to do. Things like "git > commit -a" and "git add -u" speed up the common case where I just want > to commit everything. But with submodules, that common case looks more > like this: > > cd sub > git checkout -b manual_branchname_because_there_was_no_default > git commit -a > git push etc. > cd .. > git commit -a > git push etc. Funny, for me it looks completely different: $ cd sub # work, work, work # from time to time commit # from time to time rebase -i to clean up some things # test, test, test # sometimes push And then, every once in a while, it is $ cd .. $ git add submodule $ git commit -s submodule $ git push
Just to add to the picture, for me it's $ (cd submodule && git checkout tag) $ git add submodule $ git commit -s -m "Use submodule-tag" If I want to work in/with the submodule, I usually do that by "cd ../submodule", i.e. I've got another clone of the submodule repository. -- lh