Git creates a new branch from a branch

  1. Clone the code of the remote warehouse to the local

    git clone 
    
  2. switch the branch to the one where you want to create a new branch

    git checkout 想要创建新分支的分支
    
  3. Create a new branch on the current branch

    git checkout -b 新分支名称
    
  4. Push local code to remote repository

    git push origin 新分支名称
    
  5. At this point, a new branch has successfully appeared in the remote warehouse, and the local branch is also the branch just created.

Guess you like

Origin blog.csdn.net/weixin_49343190/article/details/121902788