I have a parent repository named 'A' that contain a submodule 'B' When I clone 'A' i got 'B' detached HEAD to a specific commit.
My clone command is:
git clone --recurse-submodules https://github.com/.../A.git
After that i am enter to 'A' folder:
cd A
I am automatically on 'develop' branch - Great!
When I am enter to my submodule folder:
cd B
I am automatically got (HEAD detached at 6dce2e1
) - WHY ?!?!
I want to be automatically on develop also here.
I have read all previous question - nothing help!
What i have tried:
delete submodule -> commit -> add again with write implicit develop branch name.
checkout B repo to develop and commit it in A repo
I have already tried this post: Why is my GIT Submodule HEAD detached from master?
Also, tries this: How can I specify a branch/tag when adding a Git submodule?
It is just do not solve my issue! When i am cloning to new folder the issue is come back!
But it is simply not solved my issue.
How can i solve it? and why it is suddenly happened?