There’s no such thing as “sub-branches” in git. A branch is a method of referring to a commit that follows you as you create new commits on top of the last one it pointed to. If you choose to have a branch that has a
/ in the name, it doesn’t necessarily mean anything. Some people on large projects like to use a slash to indicate groupings of branches, like in one project I might use my initials or GitHub handle to indicate that it is my branch, for example:
LD/branch-name-here. But as far as git is concerned there’s no structural difference between a branch named
some-text/some-other-text/still-more-text/man-this-is-getting-to-be-a-pain-to-type (other than the name of the branch, of course).
So, to directly answer your question, the command to create a branch with a specific name is one of:
# Any modern version of Git
git checkout --branch some-branch-name
# Git v2.23 or later
git switch --create some-branch-name
I hope that helps!