FahamLah

Commands

git switch -c

git switch -c <name> [<start>]

Risk: Safe

What it does

Makes a new branch and moves you onto it.

When to use it

To start a new feature or fix right away.

Example

$ git switch -c hotfix/pay-button

New branch, and you are on it now.

$ git checkout -b hotfix/pay-button

The older way to do the same thing.

$ git switch -

Jump back to the branch you were on.