TOOL » GIT
Switch
Usage
Switch to a specified branch.
shell
git switch OPTIONS BRANCH START_POINT
Option | Description |
---|---|
-c --create | Create a new branch. |
-C --force-create | Create a new branch ovewriting if it already exists. |
-d --detach | Switch to a commit or tag for inspection and discardable experiments. |
-f --force --discard-changes | Proceed while discarding uncommited changes. |
-m --merge | Proceed while merging uncommited changes. |
-t --track | When creating a new branch, set up "upstream" configuration. |
Example
shell
git switch feature-branch