Run p4 clone
Here is the p4 clone command syntax:
p4 [-u user] [-d dir] [-c client] clone [-m depth] [-v] -p port -r remote p4 [-u user] [-d dir] [-c client] clone [-m depth] [-v] -p port -f filespec
p4 clone includes a number of command-line arguments:
- The
-doption specifies the directory where you want to create the server’s files. If you don’t specify this option, the files are created in the current directory. - The
-poption specifies the address of the shared server you wish to clone from. The-pprecedingP4PORTis optional. If not specified,p4 cloneuses the shared server specified by theP4PORTenvironment variable. See P4PORT meaning before and after a clone for a discussion of howP4PORThas a different meaning before and after a clone. - The
-moption performs a shallow fetch; only the last number of specified revisions of each file are fetched. - The
-roption specifies the remote spec installed on the shared server to use as a template for the clone and stream setup. You can obtain the name of the desired remote from the shared server administrator or run thep4 remotescommand against the shared server to obtain a list of candidates to choose from. At the time of cloning, P4 Server will copy the remote from the shared server to the personal server and name itorigin. For more information on remotes, see Understanding Remotes. -
The
-foption specifies a filespec in the shared server to use as the path to clone; this path will also be used to determine the stream setup in the personal server. You can specify the-foption or the-roption but not both.It is optional to specify the
-fstring on the command line. Instead, you can simply follow*`p4 clone`*with_filespec_. - The
-voption specifies verbose mode. - The
-coption lets you customize the name of the stream thatp4 clonecreates.