17 lines
455 B
Markdown
17 lines
455 B
Markdown
# git 创建分支
|
|
|
|
> 在仓库中创建一个 Git 分支。
|
|
> 属于 `git-extras`。
|
|
> 更多信息:<https://github.com/tj/git-extras/blob/master/Commands.md#git-create-branch>。
|
|
|
|
- 创建一个本地分支:
|
|
|
|
`git create-branch {{branch_name}}`
|
|
|
|
- 在本地和远程创建一个分支:
|
|
|
|
`git create-branch --remote {{branch_name}}`
|
|
|
|
- 在本地和上游(通过分叉)创建一个分支:
|
|
|
|
`git create-branch --remote upstream {{branch_name}}` |