git checkout-b
时间: 2023-08-15 11:14:36 浏览: 198
git checkout 命令使用详解
`git checkout -b` is a Git command used to create and switch to a new branch in one step. It combines two separate commands: `git branch` and `git checkout`.
The `-b` option creates a new branch with the given name, and then checks it out. For example, if you want to create a new branch called "feature-branch" and switch to it, you can use the following command:
```
git checkout -b feature-branch
```
This command is useful when you want to start working on a new feature or bug fix in a separate branch without interrupting your current work on the main branch.
阅读全文