Skip to content

forkpress clone

forkpress clone clones the ForkPress Git remote into a local editing checkout.

Use it after the preview server is running and you want to edit branch files through Git.

Usage

Terminal window
forkpress clone [remote] [dir] [--remote-name <name>]

Arguments And Options

Argument or optionDefaultDescription
remotehttp://wp.localhost:18080/site.gitGit remote URL exposed by the running ForkPress server.
dirsiteDirectory to create for the checkout.
--remote-name <name>originName for the configured Git remote.

What It Does

clone is a thin wrapper around:

Terminal window
git clone --origin <remote-name> <remote> <dir>

The checkout contains the Git view of each ForkPress branch. In production COW sites, the editable WordPress tree is under wordpress/, and database.sql is a generated, read-only database snapshot for context.

Examples

Clone the default local remote:

Terminal window
forkpress clone
cd site

Clone into a named directory:

Terminal window
forkpress clone http://wp.localhost:18080/site.git client-site

Use another remote name:

Terminal window
forkpress clone --remote-name forkpress http://wp.localhost:18080/site.git site

Next Steps

Switch to a branch, edit files under wordpress/, then push with forkpress commit:

Terminal window
git switch marketing
forkpress commit -m "Update marketing page"

See Git Workflow for the full Git transport model.