Git
Run git add -- <files...> in the target repository.
application/json- body
Stage one or more files.
files?array<string>File paths to stage, relative to the repository root.
path?stringRepository path to run git add in.
Files staged
curl -X POST 'http://sandbox:2280/git/add' \ -H 'Content-Type: application/json' \ -d '{}'Return local branch names from the target repository.
path?stringRepository path to inspect.
application/json- response
Branch list response.
branches*array<string>Short branch names present in the repository.
curl -X GET 'http://sandbox:2280/git/branches'{ "branches": [ "string" ]}Create one branch in the target repository.
application/json- body
Create or delete one named branch.
name?stringBranch name to create or delete.
path?stringRepository path to operate in.
Branch created
curl -X POST 'http://sandbox:2280/git/branches' \ -H 'Content-Type: application/json' \ -d '{}'Force-delete one branch in the target repository.
application/json- body
Create or delete one named branch.
name?stringBranch name to create or delete.
path?stringRepository path to operate in.
Branch deleted
curl -X DELETE 'http://sandbox:2280/git/branches' \ -H 'Content-Type: application/json' \ -d '{}'Switch the target repository to another branch using git switch.
application/json- body
Switch the worktree to another branch.
branch?stringBranch name to switch to.
path?stringRepository path to operate in.
Branch checked out
curl -X POST 'http://sandbox:2280/git/checkout' \ -H 'Content-Type: application/json' \ -d '{}'Clone a repository URL or local path into a destination directory. Credentials, when provided, are delivered to git via askpass and are never echoed back. Optional depth performs a shallow clone, and insecureSkipTls=true disables TLS verification for this clone invocation only.
application/json- body
Clone a repository into a target directory.
branch?|Branch to clone when commit_id is omitted.
commit_id?|Commit to detach to after cloning.
depth?|Optional shallow-clone depth. 1 clones only the tip commit.
int321 <= valueinsecureSkipTls?|Skip TLS certificate verification for this clone invocation only.
password?|Password for authenticated remotes; write-only, never echoed, delivered to git via askpass.
path?stringDestination path to clone into.
url?stringRepository URL or local source path to clone.
username?|Username for authenticated remotes; write-only, never echoed, delivered to git via askpass.
Repository cloned
curl -X POST 'http://sandbox:2280/git/clone' \ -H 'Content-Type: application/json' \ -d '{}'Create one commit and return its full SHA. Author identity is passed to git for this invocation only and is not written into repository config.
application/json- body
Create a commit.
allow_empty?booleanWhether an empty commit is allowed.
author?stringCommit author name passed to git for this invocation only.
email?stringCommit author email passed to git for this invocation only.
message?stringCommit message.
path?stringRepository path to commit in.
application/json- response
Commit creation result.
hash*stringFull commit SHA of the created commit.
curl -X POST 'http://sandbox:2280/git/commit' \ -H 'Content-Type: application/json' \ -d '{}'{ "hash": "string"}Read one git config value from global scope by default, or local scope when scope=local and path is provided.
key?stringConfig key to read.
path?stringRepository path required for scope=local.
scope?stringConfig scope; omitted means global.
application/json- response
Value of one git config key.
value?|Config value, or null when the key is unset.
curl -X GET 'http://sandbox:2280/git/config'{ "value": "string"}Write one git config value to global scope by default, or local scope when scope=local and path is provided.
application/json- body
Set one git config key.
key?stringConfig key to set.
path?|Repository path required for scope=local.
scope?|Config scope; omitted means global.
value?stringConfig value to write.
Config value set
curl -X POST 'http://sandbox:2280/git/config' \ -H 'Content-Type: application/json' \ -d '{}'Return commit metadata from git log in newest-first order.
path?stringRepository path to inspect.
application/json- response
[index: integer]?One commit from git log.
curl -X GET 'http://sandbox:2280/git/history'[ { "author": "string", "email": "string", "hash": "string", "message": "string", "timestamp": "string" }]Run git init and return the created status the historical wire contract uses.
application/json- body
Initialize a repository.
bare?booleanWhether to create a bare repository.
initial_branch?|Initial branch name for a new non-bare repository.
path?stringDestination path for the new repository.
Repository initialized
curl -X POST 'http://sandbox:2280/git/init' \ -H 'Content-Type: application/json' \ -d '{}'Pull from the repository's configured upstream by default, or from an explicit remote and optional branch, with --ff-only so divergent history becomes a conflict instead of a merge.
application/json- body
Operate on a repository, optionally with credentials for a remote.
branch?|Remote branch to push or pull. Omitted keeps the current HEAD push behaviour and git's default pull target.
password?|Password for authenticated remotes; write-only, never echoed, delivered to git via askpass.
path?stringRepository path to operate in.
remote?|Remote name. Omitted defaults to origin for push and for pull when
branch is set; a pull without branch uses git's configured upstream.
setUpstream?|Pass -u / --set-upstream on push.
username?|Username for authenticated remotes; write-only, never echoed, delivered to git via askpass.
Pull completed
curl -X POST 'http://sandbox:2280/git/pull' \ -H 'Content-Type: application/json' \ -d '{}'Push the current HEAD ref by default, or an explicit branch to remote (default origin) using an explicit <ref>:<ref> refspec. setUpstream=true passes -u to git.
application/json- body
Operate on a repository, optionally with credentials for a remote.
branch?|Remote branch to push or pull. Omitted keeps the current HEAD push behaviour and git's default pull target.
password?|Password for authenticated remotes; write-only, never echoed, delivered to git via askpass.
path?stringRepository path to operate in.
remote?|Remote name. Omitted defaults to origin for push and for pull when
branch is set; a pull without branch uses git's configured upstream.
setUpstream?|Pass -u / --set-upstream on push.
username?|Username for authenticated remotes; write-only, never echoed, delivered to git via askpass.
Push completed
curl -X POST 'http://sandbox:2280/git/push' \ -H 'Content-Type: application/json' \ -d '{}'Return configured remotes. Any userinfo in remote URLs is redacted before it is returned.
path?stringRepository path to inspect.
application/json- response
Remote list response.
remotes*array<>Configured remotes.
curl -X GET 'http://sandbox:2280/git/remotes'{ "remotes": [ { "name": "string", "url": "string" } ]}Run git remote add in the target repository.
application/json- body
Add one named remote.
name?stringRemote name to create.
path?stringRepository path to operate in.
url?stringRemote URL to store.
Remote added
curl -X POST 'http://sandbox:2280/git/remotes' \ -H 'Content-Type: application/json' \ -d '{}'Run git reset with the requested mode, target, and optional pathspecs.
application/json- body
Reset repository state.
files?array<string>Optional pathspecs to reset in mixed mode.
mode?|Reset mode (mixed, soft, hard, merge, keep); omitted means git's default mixed reset.
path?stringRepository path to operate in.
target?|Commit-ish to reset to.
Reset completed
curl -X POST 'http://sandbox:2280/git/reset' \ -H 'Content-Type: application/json' \ -d '{}'Run git restore for one or more files from the index, worktree, or an optional source tree-ish.
application/json- body
Restore paths from the index or another source.
files?array<string>File paths to restore.
path?stringRepository path to operate in.
source?|Optional source tree-ish for the restore.
staged?|Whether to restore the index entry.
worktree?|Whether to restore the worktree entry.
Restore completed
curl -X POST 'http://sandbox:2280/git/restore' \ -H 'Content-Type: application/json' \ -d '{}'Return the current branch, ahead/behind counts, and file status entries from git status --porcelain=v2 --branch -z.
path?stringRepository path to inspect.
application/json- response
Repository status.
ahead*integerCommits the local branch is ahead of its upstream.
int64behind*integerCommits the local branch is behind its upstream.
int64branchPublished*booleanWhether the current branch has an upstream.
currentBranch*stringCurrent branch name, or HEAD for a detached checkout.
fileStatus*array<>File-level status entries.
curl -X GET 'http://sandbox:2280/git/status'{ "ahead": 0, "behind": 0, "branchPublished": true, "currentBranch": "string", "fileStatus": [ { "extra": "string", "name": "string", "staging": "string", "worktree": "string" } ]}