Scan your whole stack
From OX Research Newsroom
Are you using git-p4son?
Find out what’s in your code.
Scan your apps free in minutes (opens in a new tab)Latest version: v0.14.0
git-p4son was last scanned on 27 Nov 2026 at version 0.14.0. Risk score 0 of 100. No malicious behavior was detected.
| Version | Published | Status |
|---|---|---|
| 0.14.0 LATEST | 27 Nov 2026 | No rules fired |
| 0.13.2 | 27 Nov 2026 | No rules fired |
| 0.13.1 | 24 Nov 2026 | No rules fired |
| 0.13.0 | 17 Nov 2026 | Not shown |
| 0.12.0 | 16 Nov 2026 | Not shown |
Findings for v0.14.0. The score is a capped sum of the weights of the rules that fired — not CVSS, not exploitability, and not a probability. It is not comparable across packages with different scan coverage.
The score describes 0.14.0; other versions have their own rules, not their own score.
The publisher’s own README, as collected from the registry.
git-p4son lets you work in a Perforce workspace with a local git repository, or a colocated
Jujutsu (jj) one, so you can use the familiar local development flow even though your project uses
Perforce.
The core idea is a local main branch kept in sync with the Perforce workspace. Each sync commits the changes since
the last one. You work on feature branches based on main, and rebase them onto it after a sync.
When your feature is ready, git-p4son creates a changelist from the commits on your branch. It can also create a
review, in Swarm or another review tool, with each commit as its own patch, so reviewers see the changes in the order
you made them, like the commits of a pull request on GitHub. To address feedback, commit more locally, and
git-p4son adds the new commits to the changelist and the review.
Here's a typical workflow when developing a feature using git-p4son:
# Sync main with the latest changes from Perforce
git checkout main
git p4son sync
# Start work on a new feature
git checkout -b my-fancy-feature
# Change some code
git add .
git commit -m "Feature part1"
# Sync again, and rebase your branch onto main
git checkout main
git p4son sync
git checkout my-fancy-feature
git rebase main
# Change even more code
git add .
git commit -m "Feature part2"
# Create a review with a patch per commit, under an alias named after the branch
git p4son review -m "My fancy feature"
# Address review feedback, then add the new commit to the changelist and the review
git add .
git commit -m "Address review feedback"
git p4son update --shelve
# After approval, submit in P4V, then sync and clean up
git checkout main
git p4son sync
git branch -D my-fancy-feature # -D, as the submitted change has other commit hashes
git p4son alias clean # deletes the aliases of submitted changelists
# Start working on the next feature
git checkout -b my-next-fancy-feature
The same workflow in a colocated jj workspace, with the jj p4son alias:
# Start work on a new feature
jj new main -m "Feature part1"
# Change some code, which jj snapshots into the change
# Sync main from any change: the change you are on is rebased onto it
jj p4son sync
# Change even more code in a change of its own
jj new -m "Feature part2"
jj bookmark create my-fancy-feature
# Create a review with a patch per change, under an alias named after the bookmark
jj p4son review -m "My fancy feature"
# After review feedback, add a change and move the bookmark to it
jj new -m "Address review feedback"
jj bookmark set my-fancy-feature -r @
jj p4son update --shelve
# After approval, submit in P4V, abandon the submitted changes, which deletes the
# bookmark too, then sync and clean up
jj abandon main..my-fancy-feature
jj p4son sync
jj p4son alias clean
# Start working on the next feature
jj new main -m "Next fancy feature"
sync only rebases the change you sync from, and the stack above it. Bring other bookmarks up to date with
jj rebase -b <bookmark> -d main.
pip install git-p4son
Requires Python 3.11 or later. For tab completion in bash, zsh and PowerShell, see Shell Completions. To let Claude Code drive git-p4son, see Claude Code Skill.
pip install --upgrade git-p4son
These steps set up git-p4son in an existing Perforce workspace. You only need to do this once.
Sync your workspace to a known changelist. Pick a changelist to use as the starting point for your git history:
p4 sync //...@12345
Run git p4son init. This can be anywhere inside your Perforce workspace - it doesn't have to be at the
root:
cd /path/to/your/workspace # or a subdirectory of it
git p4son init
Answer its questions, starting with the depot root: the whole workspace or the subtree you're in. It then runs
git init, sets up .gitignore and makes a first commit holding only that. See Init Command for
what it asks.
Review .gitignore. Edit the file to ensure build artifacts and other unwanted files are excluded. In a big
workspace, such as an Unreal Engine game with all of the engine source in it, git can struggle to track
everything. Ignore all but the directories you work in; Perforce still manages the rest.
Add and commit all files manually the first time
git add .
git commit -m "Initial submit all files"
Run git p4son sync to get your first official sync commit
git p4son sync
This creates a commit with message that records the CL you have synced.
From here, branch off main for local development. See the Usage Example for a typical
workflow.
git-p4son provides thirteen commands:
| Command | What it does |
|---|---|
init |
Set up a git repository in a Perforce workspace |
sync |
Sync the workspace from Perforce and commit the changes to main |
cherry-pick |
Sync only a submitted changelist's files and commit them to main |
sync-split-users |
Show or edit the users whose changelists sync commits one by one |
new |
Create a changelist from the commits on your branch, optionally with a review |
update |
Add the newer commits to an existing changelist |
review |
Create a review with one shelf per commit |
list-changes |
List the commit subjects since a base branch |
alias |
Manage the names that stand for changelist numbers |
review-tool |
Show or set the default review tool, and the one an alias records |
writable |
Keep git-tracked files writable, without p4 edit first |
completion |
Print the path to a shell completion script |
skill |
Install or show the Claude Code skill |
To see help for any command, use -h:
git p4son -h
git p4son sync -h
Note: When invoking via git p4son, the --help flag is intercepted by git (to look for man pages). Use -h
instead, or git p4son -- --help to force it through.
Alternatively, call the executable directly: git-p4son --help.
Global options:
-v, --verbose: Show verbose output (commands, elapsed times, raw subprocess output)--version: Show program versionOne command at a time: git-p4son runs one command at a time in a workspace. A second one, started while another is still running, stops with "Another git-p4son command is running in this workspace"; run it again when the first has finished. In a jj workspace the lock is jj's own. Shell completion is not held back.
Set up git-p4son in a Perforce workspace, from anywhere inside it:
git p4son init
init checks that it runs in a Perforce workspace, then asks:
[depot] root in .git-p4son/config.toml, with a $(workspace) placeholder for the workspace name,
e.g. //$(workspace)/Engine, so renaming the workspace doesn't break it. A concrete name works too.git p4son writable apply once your files are committed.$(user) entry and no removes it; other split users are left alone.jj p4son alias, as described below.Then it sets up the repository:
.gitignore: kept if it exists, else copied from .p4ignore, else created empty.git init, and a first commit holding only .gitignore.[sync] branch. In a repository it creates, that's the branch HEAD is on. In an
existing one, it's main if there is one, else the branch HEAD is on, else one you pick from the local branches.
A branch already set is kept.It ends by listing the next steps. Nothing in .git-p4son/ belongs in git: the folder has its own .gitignore that
ignores everything in it.
For jj, init offers:
.jj folder: "Use jj in this workspace too (colocated)?", default
no. On yes, in an existing repository it runs jj git init --colocate as its last step, so jj imports the branch
as a bookmark. It sets jj's line endings to match git's from jj's first snapshot on. In a
repository it creates, it lists the same commands as next steps after your initial commit instead, since jj would
otherwise snapshot every file before you have reviewed .gitignore.jj p4son alias, when the workspace has a .jj folder, or is to get one, and
jj's config has no aliases.p4son: default yes. It adds the alias to jj's user config.Running init again asks neither once they are done.
Sync the workspace from Perforce and commit what changed onto the sync branch, main by default:
git p4son sync [changelist ...] [--branch BRANCH] [--no-rebase] [--allow-backwards] [--dry-run]
[--split-user NAME ...] [--no-split] [--ignore-blocking-processes]
Arguments:
changelist (optional): Changelist number, last-synced to re-sync the last synced changelist, head
to sync to the latest changelist, or the name of a sync target, to sync to the changelist its
command prints. Omit to sync to [sync] default-target, else to the latest changelist affecting the workspace.
Several strictly increasing changelists may be given to sync each in sequence, producing one commit per
changelist. A trailing head may close out such a sequence to finish at the latest changelist.Options:
--branch BRANCH: Commit onto this branch instead of [sync] branch. With the jj backend, the bookmark to move
to each sync commit--no-rebase: With the jj backend, leave the changes you started from where they are, instead of rebasing them
onto the sync bookmark--allow-backwards: Allow syncing to changelists older than the last synced one. -f, --force still works for
now, with a warning-n, --dry-run: Print the resolved sync sequence without syncing. The arguments are validated as for a
real sync, but nothing else runs, apart from the commands of the sync targets it names: no
clean-workspace checks, no hooks, and no prompts. Ends with Dry run, nothing changed-u, --split-user NAME: Also split out this user's changelists, on top of the configured
split users. Repeat to give several users. Each name is checked against the Perforce server.--no-split: Ignore the configured split users for this sync. Users given with --split-user are still split
out, so --no-split -u alice splits out only alice's changelists.--ignore-blocking-processes: Sync even while a blocking process is running.Examples:
git p4son sync # sync to latest
git p4son sync head # sync to latest (explicit)
git p4son sync 12345
git p4son sync 123 156 178 # sync each changelist in sequence, one commit each
git p4son sync 123 156 head # sync 123, 156, then the latest changelist
git p4son sync latest-safe # sync to the changelist the latest-safe sync target prints
git p4son sync last-synced
git p4son sync 12345 --allow-backwards
git p4son sync --dry-run # show the changelists a sync to latest would visit
git p4son sync -u alice # also split out alice's changelists
git p4son sync --no-split # sync without splitting out the configured split users
git p4son sync --branch p4 # commit onto the p4 branch this time
sync commits onto the sync branch, [sync] branch in .git-p4son/config.toml, which init sets and which
defaults to main. From another branch, it checks the sync branch out, syncs and commits, then returns you to
where you started, telling you to git rebase your branch onto the sync branch; it doesn't rebase for you. The
pre-sync and post-sync hooks run on the sync branch. You stay on the sync branch when:
A failing pre-sync hook, or anything else that stops sync before it syncs, returns you to where you started.
sync requires clean git and Perforce workspaces: no uncommitted changes, untracked files included, and no
git-tracked files opened in Perforce. It checks them after any blocking processes and before
the pre-sync hooks.
Syncing while e.g. the Unreal editor is open lets p4 replace assets the editor still has loaded, so the editor
keeps working against files that no longer match what is on disk. List such processes in .git-p4son/config.toml
and sync refuses to start while any of them is running:
[sync]
blocking-processes = ["UnrealEditor", "UnrealLightmass"]
Names are matched with any .exe suffix stripped and case ignored, so a single entry covers UnrealEditor.exe on
Windows and UnrealEditor on macOS. The check runs before the clean-workspace checks and the pre-sync hooks. A
malformed setting, or a process list that cannot be read, aborts the sync rather than silently
skipping the check.
Pass --ignore-blocking-processes to sync once without the check, or remove the setting to turn it off for good.
The latest changelist is often not one you want: it may not compile yet, or may not have passed the smoke tests.
What makes a changelist good differs per team, such as a green CI build, precompiled binaries or a QA sign-off, so
git-p4son asks a command of yours. Name it as a sync target in .git-p4son/config.toml:
[sync]
default-target = "latest-safe"
[sync.targets]
latest-safe = ["python", "tools/latest-safe-cl.py", "--after", "$(last-synced)", "--path", "$(depot-root)/..."]
git p4son sync latest-safe then runs the command and syncs to the changelist it prints, exactly as if you had
typed the number: it must be newer than the last synced one unless you pass --allow-backwards, and it may stand
anywhere in a sequence, such as git p4son sync 12345 latest-safe. With default-target, a bare git p4son sync
syncs to that target, while git p4son sync head still goes to the latest changelist. Tab completion offers the
target names.
The command runs from the workspace root, like a review tool's: a target is a list, one string
per argument, run without a shell, with a relative program found from the workspace root and a bare name on PATH.
$(name) in an argument is replaced as in a review tool's command, apart from $(changelist), and two more:
$(last-synced): the last synced changelist, or empty before the first sync$(depot-root): the depot root, such as //myclientFind threats in your stack.
OX Radar can check high-priority threats, like critical package CVEs, against your context.
Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.
The probe returned only these fields for this server — auth requirement, protocol and tool list weren’t observed, so they’re not shown (never guessed).
The publisher’s own links, as the registry reports them. These are not sources for the assessment on this page.