Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR is ment to fix issue: #32
After running something like:
git submodule update --init --recursive
The submodules should conain remote changes and be on branch.
When i googled this issue i found this:
https://stackoverflow.com/questions/18770545/why-is-my-git-submodule-head-detached-from-master
And i also took a closer look at the Docu:
https://git-scm.com/book/en/v2/Git-Tools-Submodules
How i want to fix this:
submodule.<submodule-path>.update
sets the update method.This defaults to
checkout
."the commit recorded in the superproject will be checked out in the submodule on a detached HEAD"
I think the more sensible method is
rebase
:"the current branch of the submodule will be rebased onto the commit recorded in the superproject"
submodule.<submoduke-path>.branch
sets the remote branch for a submodule.As far as i can tell this only has an effect during initialization... this is where i start to get confused.
There is a Problem with these settings... I think.
rebase
rebases the **current ** branch of the submodule.If i have a submodule checked out on a feature branch and i run
git submodule update
this would change the content of the feature branch and not the content of main.This might be confusing and create chaos.