git checkout -b

From wikieduonline
Revision as of 11:43, 15 February 2023 by Brave (talk | contribs)
Jump to navigation Jump to search

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

Advertising: