git checkout: add example for creating new branch based on remote branch with different name (#2494)

italian
Mike Rogne 2018-10-27 18:52:23 -05:00 committed by Muhammad Falak R Wani
parent 39b4dd2a99
commit 3bf256f6cb
1 changed files with 4 additions and 0 deletions

View File

@ -6,6 +6,10 @@
`git checkout -b {{branch_name}}`
- Create and switch to a new branch based on a specific reference (branch, remote/branch, tag are examples of valid references):
`git checkout -b {{branch_name}} {{reference}}`
- Switch to an existing local branch:
`git checkout {{branch_name}}`