How do I change branches from within a submodule? When I run git branch
from within the submodule, I see the following output:
> git branch
* (HEAD detached from 229a7b2)
master
How would I put myself on a new branch? Like development
?
Simply list your branches:
git branch -avv
And then checkout the one you want
git checkout -b myBranch origin/mybranch
Or create a new development branch from the commit you currently are:
git checkout -b development
A submodule is always checked out as a detached HEAD (meansing at a SHA1)
When you change that, and make any new commit (or change the current commit by a branch checkout), don't forget to:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With