PIERRE COMPUTER COMPANY
CODE STORAGE
2026
<< back
Date:JAN.09.2026Feature:Git ForkAuthor:Dwayn Matthies
------

Git Fork creates a new repository by cloning an existing repo inside Code Storage. It is a clean way to spin up an isolated copy of a repo at a specific ref or commit without affecting the source. Forks are full repositories, so you can push, create branches, and work independently.

The fork request names a base repo and supplies a read token for it. You can fork at a branch with ref, or pin to an exact commit with sha. This makes it straightforward to create a working copy for docs updates, experiments, or review workflows without changing the source repository.

curl -X POST \
  -H "Authorization: Bearer $NEW_REPO_TOKEN" \
  -H "Content-Type: application/json" \
  https://code.storage/api/v1/repos \
  -d @- <<'JSON'
{
  "base_repo": {
    "provider": "code.storage",
    "owner": "pierre",
    "name": "sdk-documentation",
    "operation": "fork",
    "ref": "main",
    "auth": {
      "auth_type": "jwt",
      "token": "BASE_REPO_READ_TOKEN"
    }
  }
}
JSON

The base repo stays unchanged. The new repo starts at the ref or SHA you chose, so you can build feature work or experiments without sharing state with the original.

+ UP NEXT +