Git · Branches and integration
git switch
Creates and switches branches. Prefer it over checkout for branch operations.
Syntax
git switch -c <branch>Example
Example
git switch -c feature/auth git switch main
More in this group
Learn this in the course
Reference pages are the quick answer. The course explains the why, shows the full example and ends with a challenge.