Difference between revisions of "Git switch --create / -c"
Jump to navigation
Jump to search
m (Welcome moved page Git switch -c to Git switch --create / -c) |
|||
Line 2: | Line 2: | ||
* Switch to a specified branch. https://git-scm.com/docs/git-switch | * Switch to a specified branch. https://git-scm.com/docs/git-switch | ||
− | [[git switch]] -c [[ | + | [[git switch]] -c [[your_new_branch]] |
Revision as of 11:07, 19 January 2024
- Switch to a specified branch. https://git-scm.com/docs/git-switch
git switch -c your_new_branch
You are in 'detached HEAD' state. You can look around, make experimental changes and commit them, and you can discard any commits you make in this state without impacting any branches by switching back to a branch.
Move existing, uncommitted work to a new branch in git
See also
git switch
git branch
,git: upstream
,git branch --delete branch name
,[ --list | -a | -r | -M ]
Advertising: