Thread (9 messages) flat view 9 messages, 4 authors, 2016-06-15

Why do git submodules require manual checkouts and commits?

From: <hidden>
Date: 2016-06-15 22:44:37

Why do git submodules require manually committing the submodule itself
to each super repository after something in the submodule repository
changes? Is there some reason the super repository can't just "link"
to the submodules by branch name? It seems that if the .gitsubmodules
also specified the branch to use:

[submodule "libfoo"]
	path = libs/foo
	url = git://foo.com/git/libfoo.git
	branch = master

[submodule "libbar"]
	path = libs/bar
	url = git://bar.com/git/libbar.git
	branch = stable

Then a git pull (or git clone) of the super repository could also pull
in all submodules. A commit to a file in a submodule would then be
automatically reflected in the super repository (since the super
repository would always pull HEAD of that branch).

Is this difficult (or somehow undesirable)?
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help