p4 switch


Switch to a different stream, with an option to populate that stream, or display current streams.


p4 [g-opts] switch [-c -m -r] [-P parentstream
p4 switch -l
p4 switch


This command allows you to create, manage and switch between your streams. Note that p4 switch automatically performs a p4 reconcile and p4 sync as part of its operations and automatically shelves work in progress when switching between streams.


With no options specified p4 switch displays the current stream.


Specifies that the new stream be populated with exactly the same files that are in the current stream.


Lists all known branches.


Specifies that the new stream has no parent.

-P parent

Specifies the parent stream of the new stream, letting you branch from a stream other than the current one.


Reopens files in the new mapped location of the specified stream.

Usage Notes

Can File Arguments Use Revision Specifier?

Can File Arguments Use Revision Range?

Minimal Access Level Required



open to use the -c or -r options,
list to use the -L option,
or write for default switching


p4 switch -r bugfix17

Switch to the bugfix17 stream and open all the files in it.

Related Commands


p4 merge


p4 resolve