Difference between revisions of "Git switch --create / -c"
Jump to navigation
Jump to search
Tags: Mobile web edit, Mobile edit |
Tags: Mobile web edit, Mobile edit |
||
Line 3: | Line 3: | ||
[[git switch]] -c [[main]] | [[git switch]] -c [[main]] | ||
+ | |||
+ | |||
+ | 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. | ||
== See also == | == See also == |
Revision as of 19:24, 8 March 2023
git switch -c main
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.
See also
git switch
git branch
,git: upstream
,git branch --delete branch name
,[ --list | -a | -r | -M ]
Advertising: