Perforce Cheat Sheet: Commands and Features in Helix Core
Perforce Helix Core is a leading version control tool. But do you know all the Perforce commands and features? In this blog, we give you a Perforce cheat sheet to help you get started with Helix Core faster.
What’s In the Perforce Cheat Sheet?
This Perforce cheat sheet covers:
Keep reading to go in-depth on each of these aspects of Perforce Helix Core.
Want to save a copy? Get a PDF version of the cheat sheet.
Perforce Basics: How Helix Core Works
Helix Core is version control software from Perforce.
There are multiple clients that connect Helix Core. In this Perforce cheat sheet for Helix Core, we cover two primary clients:
If you’re not using Helix Core yet, you can get started now for free for up to 5 users and 20 workspaces. And use the commands and features today.
Perforce Commands: Helix Command-Line (P4) Cheat Sheet
The Helix Command-Line is where you use Perforce commands (also known as P4 commands) in Helix Core.
The following Perforce commands will help you get started in Helix Core.
What It Does
Open a new file to add it to the depot
Create or edit a changelist description
Display list of pending and submitted changelists
Create or edit a client specification and its view
Display list of known clients
Delete or refresh local files to match depot state
Display diff of client file with depot file
Open an existing file for edit
Update a client workspace’s have list without copying any files
List revisions last synced
Lock an opened file against changelist submission
Move file(s) from one location to another
Display list of files opened for pending changelist
Retrieve a depot file to the standard output
Make workspace consistent with depot
Move the location of files
Change the type or changelist number of an opened file
Copy shelved files from an existing shelf
Merge open files with other revisions or files
Show files that have been merged but not submitted
Discard changes from an opened file
Store files from a pending changelist into the depot
Reports which files need to be added, opened or deleted
Submit open files to the depot
Synchronize the client with its view of the depot
Undo a range of revisions
Release a locked file but leave it open
Restore shelved files from a pending change into a workspace
Update workspace without clobbering files changed
P4 Commands vs…
Currently switching to Helix Core from another version control tool? Compare common commands:
Branching and Merging
The following Perforce commands will help you branch and merge more efficiently — and accelerate development velocity.
What It Does
Create or edit a branch specification
Display list of branches
Make target identical to source by branching, replacing or deleting
Schedule integration from one file to another
Merge changes from one set of files into another
Branch files to target without requiring a workspace
Remove unmodified branched files from a stream
Create or edit a stream specification
Display a list of known streams
Switch to and/or create a new stream/branch (DVCS)
Get tips for version control branching >>
The following Perforce commands will help you investigate what’s happening in Helix Core.
What It Does
Get a listing of all currently defined aliases
Print file lines along with their revisions
List the changes not synchronized in the current client
Display list of depots
Display a changelist description
Display diff of two depot files
List subdirectories of a given depot directory
List revision history of files
List files in the depot
Dump file info in format suitable for parsing by scripts
Print lines in files (or revisions of files) that match a pattern
Print this help message
Display the ignore mappings
Print out client/server information
Show integrations that have been submitted
List changes not yet integrated from source to target
Show the stream’s integration status
Display size information for files in the depot
Show how file names map through the client view
The following Perforce commands will help you do Helix Core jobs.
What It Does
Mark jobs as being fixed by named changelists
List what changelists fix what job
Create or edit a job (defect) specification
Display list of jobs
The following Perforce commands will help you work with labels.
What It Does
Create or edit a label specification and its view
Display list of labels
Synchronize label with the current client contents
Tag files with a label
The following Perforce commands are super commands that help admins strengthen security.
What It Does
Change members of a user group
List groups of users
Login to Helix by obtaining a session ticket
Perform second factor authentication
Logout of Helix by removing or invalidating a ticket
Set user password on server (and Windows client)
Modify protections in the server namespace
Display protections in place for a given user/path
Set variables in the registry (Windows only)
Display list of session tickets for this user
Establish trust of an SSL connection to a Helix service
Create or edit a user specification
Display list of known users
Learn even more P4 commands >>
Perforce Features: Helix Visual Client (P4V) Cheat Sheet
Helix Visual Client has many features you should know.
Here we cover:
- Stream types
- File status
The toolbar in P4V is where you perform key actions. Here are some helpful shortcuts.
Get Latest Revision
Get latest revision of files.
Submit your changes.
Drag file from workspace
tree to a pending changelist.
Drag and drop a file revision onto another revision to diff.
Dynamically browse through a file’s history.
See a file’s integration history: when it was added, branched, edited, merged, copied, or deleted.
Stop an action.
Views in P4V are how you see progress. Here are some helpful shortcuts.
Perforce Streams helps teams automate branching and merging. Stream types define how code changes should flow. Here’s a quick overview of Stream types. \
Used for fixing bugs, testing, and release distribution
Serves as the base or trunk of a stream system
Used for long term projects and major new features
Used to narrow the scope and submit directly to parent
Creates a lightweight branch for bug fixes and new features
Learn more about Perforce Streams >>
File status icons indicate the status of each file. This helps developers avoid duplicating effort.
For example, there are file status icons to indicate:
- In depot
- Not in depot
- Not mapped to workspace
- Workspace differs from head revision
- Imported from another stream
- Symbolic link
Badges on file icons indicate a new status. You can see who is working on files, and when new changes are available.
For example, there are badges to indicate:
- File in your workspace that differs from the head revision, which has been checked out = by you and another user
- Marked for add
- Marked for add by another
- Marked for delete
- Marked for delete by another
- Checked out by you
- Checked out by another
- Open for edit by you
- Open for edit by another
- Add/move by you
- Add/move by another
- Delete/move by you
- Delete/move by another
- Workspace version is up to date
- Workspace version is not latest version
- Locked by you
- Needs resolve (conflicting changes have been made)
Put Your Perforce Cheat Sheet to Practice With Helix Core
Now that you’ve learned all the Perforce basics, it’s time to put it into practice. Get started with Helix Core for free for up to 5 users and 20 workspaces today.