Limited Time Offer!

For Less Than the Cost of a Starbucks Coffee, Access All DevOpsSchool Videos on YouTube Unlimitedly.
Master DevOps, SRE, DevSecOps Skills!

Enroll Now

Most User P4 Command Line – P4 Commands Reference

p4-command-line

p4-command-line

p4 add

Open file(s) in a client workspace for addition to the depot.

Assigns a specific file type to a new file, overriding any settings in the typemap table

p4 add -t binary file.pdf

Opens all the files within the user’s current directory for add, and links these files to changelist 13.

p4 add -c 13 *

Opens all *.c files in the user’s ~/src directory for add; also opens the README file in the user’s current working

directory for add. These files are linked to the default changelist.

p4 add README ~/src/*.c

Opens a file named *.c for add.

p4 add -f *.c

p4 admin

Perform administrative operations on the server.

Stop the Perforce server

p4 admin stop

p4 change

Create or edit a changelist specification.

Create a new changelist.

p4 change

Edit previously submitted changelist 25. Administrator or superuser access is required.

p4 change -f 25

p4 changelists

List submitted and pending changelists.

p4 delete

Open file(s) in a client workspace for deletion from the depot.

Opens the file called README in the depot’s top level directory for deletion. The corresponding file within the client workspace is immediately deleted, but the file is not deleted from the depot until the default changelist is submitted.

p4 delete //depot/README

Opens file in the current client workspace for deletion. The file is immediately removed from the client orkspace, but won’t be deleted from the depot until changelist 40 is sent to the server with p4 submit.

p4 delete -c 40 file

p4 edit

Opens file(s) in a client workspace for edit.

Opens all files ending in .txt within the current directory’s doc subdirectory for edit. These files are linked to the default changelist; these files are stored as type text with keyword expansion.

p4 edit -t text+k doc/*.txt

p4 have

List files and revisions that have been synced to the client workspace

p4 info

Display information about the current client and server.

p4 integrate

Open files for branching or merging.

Branch or merge all files in //depot/dev/… to the corresponding files in

//depot/rel2/… If there is no corresponding file in //depot/rel2/…, this creates it.

p4 integ //depot/dev/… //depot/rel2/…

p4 job

Create or edit a defect, enhancement request, or other job specification.

p4 login

Log in to a Perforce server by obtaining a ticket.

p4 passwd

Change a user’s Perforce password on the server.

p4 resolve

Resolve conflicts between file revisions.

p4 revert

Discard changes made to open files.

Revert all open files to their pre-opened state.

p4 revert //depot/…

p4 submit

Send changes made to open files to the depot.

Submit the default changelist. The user’s revisions of the files in this changelist are stored in the depot.

p4 submit

Submit changelist 41.

p4 submit -c 41

p4 sync

Copy files from the depot into the workspace.

p4 sync

p4 sync file.c#4

p4 sync //depot/proj1/…@21

p4 user

Create or edit Perforce user specifications and preferences.

View the user specification of Perforce user joe.

p4 user joe

Edit the user specification for the current Perforce user.

p4 user

Delete the user specification for the Perforce user sammy.

p4 user -d sammy

P4CONFIG

Rajesh Kumar
Follow me
Latest posts by Rajesh Kumar (see all)
Subscribe
Notify of
guest
0 Comments
Newest
Oldest Most Voted
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x