What is the correct way for git to create a sub-branch under a branch
Two steps
#切换到分支 git checkout branch1 #基于该分支创建子分支 git checkout -b branch2_based_on_b1 branch1
checkout -b
git checkout -b new branch name old branch name (this way of writing means creating a new branch based on the old branch)
Two steps
checkout -b
git checkout -b new branch name old branch name (this way of writing means creating a new branch based on the old branch)