This is a quick cheat sheet guide for git users trying to migrate over to perforce. It does not include an exhaustive list of commands, this is just a simple cheat sheet to get people started.
Command | Git Equivalent | Perforce Documentation | Notes |
p4 sync | git pull / git fetch | https://www.perforce.com/manuals/cmdref/Content/CmdRef/p4_sync.html | |
p4 integrate | git merge | https://www.perforce.com/manuals/cmdref/Content/CmdRef/p4_integrate.html | |
p4 opened | git status | https://www.perforce.com/manuals/cmdref/Content/CmdRef/p4_opened.html | The git status command isn’t a direct equivalent of p4 opened. However, p4 opened will show what files you have checked out that are not yet submitted. |
p4 edit | git checkout | https://www.perforce.com/manuals/cmdref/Content/CmdRef/p4_edit.html#p4_edit | The git checkout command is usually used for checking out a branch, there is no direct equivalent in git for p4 edit. All files in p4 must be “checked out” first before they can be checked in. |
p4 submit | git push/git commit | https://www.perforce.com/manuals/cmdref/Content/CmdRef/p4_submit.html#p4_submit | In git you usually have to do a git commit command and then a push. In p4, it’s all in one command, and you submit a “changelist” |