Skip to content

forkpress git

forkpress git passes arguments to Git, with one ForkPress-aware extension for local branch creation.

Use it when you want a Git-compatible wrapper, or when a workflow expects forkpress git branch create <name>.

Usage

Terminal window
forkpress git [--work-dir <path>] [--php-bin <path>] <git-args>...

Shared Options

OptionDefaultDescription
--work-dir <path>.forkpressSite state directory used only by the ForkPress-aware git branch create extension.
--php-bin <path>Embedded PHPPHP binary used by branch creation helpers.

Passthrough Mode

For most invocations, forkpress git runs:

Terminal window
git <git-args>...

Examples:

Terminal window
forkpress git status
forkpress git log --oneline
forkpress git fetch origin

The command runs Git in the current working directory and inherits standard input, output, and error.

ForkPress Branch Creation

The special form forkpress git branch create <name> creates a ForkPress branch directly through the active site storage strategy instead of invoking Git.

Terminal window
forkpress git branch create <branch> [--from <source>] [--user <name> --password <password>]
OptionDefaultDescription
--from <source>mainSource ForkPress branch to copy.
--user <name>NoneForkPress user for auth-enabled experimental branch creation. Must be paired with --password. Production COW does not use it.
--password <password>NoneForkPress password for auth-enabled experimental branch creation. Must be paired with --user. Production COW does not use it.

Example:

Terminal window
forkpress git branch create marketing --from main

For production COW sites, this is equivalent to:

Terminal window
forkpress branch create marketing --from main

Failure Cases

forkpress git requires at least one argument. It also requires the git binary for normal passthrough mode.

For the special git branch create form, ForkPress validates the site at --work-dir, prepares the runtime if needed, and requires the source branch to exist.