Difference between revisions of "Git checkout -b"
Jump to navigation
Jump to search
Tags: Mobile web edit, Mobile edit |
|||
Line 18: | Line 18: | ||
== Related == | == Related == | ||
* [[Create Git branch with current changes]] | * [[Create Git branch with current changes]] | ||
− | |||
== See also == | == See also == |
Revision as of 04:07, 20 March 2023
https://git-scm.com/docs/git-checkout
Create a new branch and change to it:
git checkout -b YOUR_NEW_BRANCH_NAME Switched to a new branch 'YOUR_NEW_BRANCH_NAME'
git checkout -b "Name with spaces" fatal: 'Name with spaces' is not a valid branch name.
Create a new branch
git branch new_branch_name
git checkout new_branch_name
git push --set-upstream origin new_branch_name
Related
See also
git checkout
[-b
|master | main | -f
]git branch
,git: upstream
,git branch --delete branch name
,[ --list | -a | -r | -M ]
Advertising: