About This Manual
This guide tells you how to use the Perforce Command-Line Client (p4). If you're new to version management systems, you don't know basic Perforce concepts, or you've never used Perforce before, read Introducing Perforce before reading this guide. This guide assumes a good basic understanding of version control.
Command line versus GUIs
Perforce provides many applications that enable you to manage your files, including the Perforce Command-Line Client, GUIs such as P4V, and plug-ins. The Perforce Command-Line Client enables you to script and to perform administrative tasks that are not supported by Perforce GUIs.
Getting started with Perforce
If this is your first time working with Perforce, here's how to get started:
-
Read Introducing Perforce to learn the basics.
At a minimum, learn the following concepts: changelist, depot, client workspace, sync, and submit. For short definitions, refer to the glossary at the back of this guide.
-
Ask your Perforce administrator for the host and port for your Perforce service.
If you intend to experiment with Perforce and don't want to risk damaging your production depot, ask the Perforce administrator to start another service for test purposes. For details about installing the Perforce service, refer to the Perforce Server Administrator's Guide: Fundamentals.
-
Use this guide to help you install the Perforce Command-Line Client and configure your client workspace, unless your system administrator has already configured your machine. See “Configuring P4”, for details.
-
Learn to perform the following tasks:
-
sync (transfer selected files from the repository to your computer)
-
submit (transfer changed files from your workspace to the repository)
-
revert (discard changes)
See “Managing Files and Changelists”, for details.
-
-
Learn to refine your client view. See Refining workspace views for details.
These basic skills enable you to do much of your daily work. Other tasks involving code base maintenance (streams, branching and labeling) and workflow (jobs) tend to be less frequently done. This guide includes details about performing these tasks using p4 commands.
Perforce documentation
This guide, the P4 Command Reference, and the p4 help command are the primary documentation for the Perforce Command-Line Client. This guide describes the current release. For documentation for older releases, refer to the Perforce web site.
For documentation on other Perforce applications, see the documentation web page at http://www.perforce.com.
For specific information about... |
See this documentation |
---|---|
The basics of Perforce |
|
Installing and administering the Perforce service, including user management, security settings and configuring distributed environments that include proxies, replicas, and edge servers. |
Perforce Server Administrator's Guide: Fundamentals and Perforce Server Administrator's Guide: Multi-site Deployment |
p4 command line flags and options (reference) |
P4 Command Reference, p4 help |
P4V, the cross-platform Perforce Visual Client |
P4V User's Guide, P4V online help |
Working offline with the Perforce Sandbox |
|
Perforce plug-ins and integrations |
IDEs: Using IDE Plug-ins Defect trackers: Defect Tracking Gateway Guide Others: online help from the Perforce menu or web site |
Developing custom Perforce applications using the Perforce C/C++ API |
|
Working with Perforce in Ruby, Perl, Python, and PHP |
Please give us feedback
We are interested in receiving opinions on this guide from our users. In particular, we'd
like to hear from users who have never used Perforce before. Does this guide teach the topic
well? Please let us know what you think; we can be reached at
<[email protected]>
.
What's new in this guide for 2014.2
This section provides a list of changes to this guide for the Perforce Server 2014.2 release. For a list of all new functionality and major bug fixes in Perforce Server 2014.2, see the Perforce Server 2014.2 Release Notes.
Major Changes
- New
ChangeView
field in client workspace specification -
Client workspace specification now includes a
ChangeView
field that locks specified depot paths to a particular changelist level. See Restricting access by changelist.
Minor Changes
- New streams path type,
import+
-
New streams path type,
import+
allows you to submit changes to the the files referenced in the path. See Stream Paths. - Updates to fix documentation errors and omissions
-
-
Documented the
StreamAtChange
workspace specification option. See Viewing a stream as of a specific changelist. -
Documented the
import @
stream path option. See Stream Pathschangelist
-
Documented the fact that Perforce performs a safe sync if the
allwrite
andnoclobber
options are both set for a client workspace. See Configuring workspace options -
Corrected example errors in Populating Codelines.
-