Perforce refresher
Perforce (Helix Core) is centralised: one server holds the history, and your workspace syncs the files you map. You check out a file before editing (which can lock it), group edits in a changelist, and submit straight to the server. There's no local commit and no push. Shelving shares work without submitting it. Streams are its branches.
The vocabulary
| Perforce | Means |
|---|---|
| Depot | The repository on the server, e.g. //WadOfGore/main/... |
| Workspace (client) | Your local folder plus a mapping of which depot paths it contains. You can map only part of a huge depot |
| Sync / Get Latest | Download the latest (or a specific) version of the files you map |
Check out (p4 edit) | Tell the server "I'm editing this". Makes the file writable, and others see it's checked out |
Exclusive checkout (+l file type) | Only one person at a time. Standard for .uasset/.umap |
| Mark for add / delete | New or removed files, which also go in a changelist |
| Changelist (CL) | A group of file changes plus a description. The default changelist, or numbered ones you create to separate work |
| Submit | Send the changelist to the server. It's now history, with a CL number, for everyone |
| Shelve | Upload a changelist to the server without submitting. Used for code review, handing work to someone, or backup |
| Resolve | Merge your version with a newer one someone submitted (the conflict step) |
| Streams | Managed branches: mainline, development, release. Changes merge down (from more stable) and copy up (to more stable) |
| P4V | The desktop app. p4 is the command line |
Git ↔ Perforce translation
| Git | Perforce | Watch out |
|---|---|---|
clone / pull | Create workspace / Sync | You can sync only some paths, or an older revision |
| Just edit | Check out first | Editing without checkout: the file is read-only, or the server doesn't know you changed it |
| Staging + commit | Changelist | |
push | Submit | Commit and push are one step. Submit means everyone has it now |
| Commit hash | CL number | Increasing numbers: CL 48213 is after 48212 |
| Branch | Stream | Much heavier than a git branch; not made casually |
stash / PR branch | Shelve | Reviews (Helix Swarm) are usually done on shelved CLs |
restore (discard edits) | Revert | Same word, different meaning! See below |
revert (undo a commit) | Back out / undo a submitted CL | |
| Git LFS lock | Exclusive checkout | Built in, not an add-on |
.gitignore | .p4ignore (and the workspace mapping) |
In Perforce, Revert means "throw away my local changes to this file and undo the checkout". In
git, revert means "make a new commit that undoes an old commit". A git user who reverts in P4V
expecting the git meaning loses their edits.
A normal day in Perforce
- Get Latest (sync) before starting.
- Check out the files you'll touch. For assets, Unreal does this for you if Revision Control is connected (it asks, or auto-checks out on modify).
- Keep separate tasks in separate numbered changelists, not everything in the default one.
- Shelve for review if the team reviews (Swarm), then address comments.
- Sync again, resolve anything newer, build, then Submit with a clear description.
- Don't leave files checked out overnight that others need, especially exclusive ones. Teams notice.
Perforce + Unreal specifically
- Revision Control in the editor (bottom-right of the editor): connect to Perforce, and the Content Browser shows checkout status icons. Saving an asset prompts to check it out.
- Exclusive checkout on binary assets (typemap
binary+lfor.uasset/.umap) is why Perforce is the studio default: two people can never edit the same Blueprint. - Unreal Game Sync (UGS): Epic's tool for syncing to a CL that's known to build, often with precompiled binaries, so artists don't compile C++.
- Typemap: server-side rules for file types (binary, exclusive lock, how many old revisions to keep).
"Have you used Perforce?" → "Yes, on [project]: check out, changelists, submitting, with exclusive checkout on assets. These days I mostly use git with LFS and locking, so I'm comfortable with both models: centralised with locking for binary-heavy work, and branches with pull requests for code." Name the project and what you actually did in it. Specifics are what make the answer believable.
Quiz yourself
What's a workspace, and why does it have a mapping?
Your local folder plus the list of depot paths it contains, so you can sync only the parts of a huge depot you need.
Git's commit + push is what single step in Perforce?
Submit (a changelist).
What does Revert mean in Perforce, and why is it dangerous for git users?
It discards your local changes and undoes the checkout. Git's revert creates an undo commit, so the same word could cost you your edits.
What's shelving for?
Storing a changelist on the server without submitting it, for code review, handing work over, or backup.
Why do studios use exclusive checkout for .uasset?
Binary assets can't be merged, so only one person may edit one at a time.
Streams: what do "merge down" and "copy up" mean?
Merge down: bring changes from a more stable stream into a less stable one. Copy up: promote finished work to a more stable stream.
What's Unreal Game Sync for?
Syncing to a changelist known to build, often with precompiled binaries, so non-programmers can work without compiling.
Why use separate numbered changelists?
To keep unrelated work apart, so each submit (and its review) is one coherent change, like one-idea git commits.