p4 switch (graph)
Switch to a different branch, or create a branch.
Syntax
p4 switch [ -a | -n repo ] branch
p4 switch -c [ -a | -n repo ] branch
p4 switch -d [ -a | -f | -n repo ] branch
p4 switch -l
Description
The switch command moves the client to a different branch, optionally creating that branch.
Use the first form of the command to switch the current branch for your client.
Options
|
List the branches |
|
Applies for clients having more than one repo. All repos that contain the specified branch switch to it. Repos that do not contain the specified branch remain on their current branch. |
|
Create the specified branch and switch to that branch. |
|
Force the deletion of a branch. This option is required when a branch was not merged to master. |
|
Named repo. For example, to create a branch by specifying a named repo:
Branch refs/heads/dev created in repo //gd1/repo2. |
|
Create the specified branch and switch all repos to that branch. Example:
|
|
Delete the specified branch. |
|
Delete the specified branch on all repos. Example:
|
|
Delete the specified branch on the specified repo. Example:
Tip
We recommend that you not delete the branch you are currently on because this detaches your current branch HEAD from any tag or branch. This means your commit is unnamed and can be removed by a |