git checkout -b
(Redirected from Create a new branch)
Jump to navigation
Jump to search
git checkout -b (doc)
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.
git checkout -b name_from_existing_branch fatal: A branch named 'name_from_existing_branch' already exists.
Create a new branch[edit]
git branch new_branch_name
git checkout new_branch_name
git push --set-upstream origin new_branch_name
Activities[edit]
Errors[edit]
See also[edit]
git checkout[-b|master | main | -f], refnamegit branch,git: upstream,git branch --delete branch name, --unset-upstream,[ --list | -a | -r | -M ]
Advertising: