[p4] Git style of working with feature branches

P4Sam perforce-user-forum at forums.perforce.com
Wed May 27 08:40:01 PDT 2015

Posted on behalf of forum user 'P4Sam'.

The workflow in Perforce is pretty much the same as what you describe.

1) Clone from the shared server:

p4 clone -p server:1666 -f //depot/project/...  
2) Create a dev stream:

p4 switch -c dev  
3) Work in the dev stream:

p4 edit (files) p4 submit p4 edit (files) p4 submit etc   
4) Switch back to the main stream, fetch updates from the shared server:

p4 switch main p4 fetch   
5) Merge the changes from your dev stream:

p4 merge --from dev p4 resolve -as p4 resolve p4 submit   
6) Push your changes back:

p4 push  
You can also do all of this directly on the shared server (by creating a new
branch/stream there, doing your work, then merging it back) -- the commands are
slightly different in that case.

Please click here to see the post in its original format:

More information about the perforce-user mailing list