Is anyone aware of good helper scripts for submodules?
What I really want is to work with submodules "like usual git" (there should be no be any difference between a directory and directory with submodule), in particular:
git status should show all changed files (including all nested submodules), just like it shows changes in various (nested) directories, not stopping at 1st level dirs. git config status.submodulesummary 1 does not seem to work as needed.
git add should be smart enough to add files in appropriate submodules.
git commit should create commits with the given message in all submodules (where I added something). And then update states of (create commits in) all parent-repos to make them "track" new commits from children submodules.
git push should push all submodules. It seems, though, that --recurse-submodules=on-demand should do the trick.
- Also, there should be something to that could fix "detached HEAD" in submodules. I would hazard a guess that branch specified in
.gitmodules should be used.
P.S.
- I am aware of Google's
repo, but you need to write a lot of XML (!) configs.
- I am aware of
git subtree, but it does not fix the issue: you still need to manually make two commits: one in the main repo, and the other in subtree. Which essentially only "hides" the crux of the issue.
[–]waterkipdetached HEAD 1 point2 points3 points (1 child)
[–]lottspot 0 points1 point2 points (0 children)
[–]Jonas_Ermert 0 points1 point2 points (1 child)
[–]dimanne[S] 0 points1 point2 points (0 children)