Files
cheatsheet-tldr/tldr/git-create-branch
2025-05-23 00:20:11 +00:00

23 lines
521 B
Plaintext

---
syntax: markdown
tags: [tldr, common]
source: https://github.com/tldr-pages/tldr.git
---
# git create-branch
> Create a Git branch in a repository.
> Part of `git-extras`.
> More information: <https://manned.org/git-create-branch>.
- Create a local branch:
`git create-branch {{branch_name}}`
- Create a branch locally and on origin:
`git create-branch {{[-r|--remote]}} {{branch_name}}`
- Create a branch locally and on upstream (through forks):
`git create-branch {{[-r|--remote]}} upstream {{branch_name}}`