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.
force?booleanForce deletion of an unmerged branch using git branch -D.
Defaults to false: deletion uses git branch -d, refusing an unmerged
branch with 409 CONFLICT. Ignored when creating a branch.
name?stringBranch name to create or delete. A leading + is a literal part of the
name, not a refspec force marker.
path?stringRepository path to operate in.
Branch created
curl -X POST 'http://sandbox:2280/git/branches' \ -H 'Content-Type: application/json' \ -d '{}'Delete one branch using git branch -d by default: an unmerged branch is refused with 409 CONFLICT. Set force=true to use git branch -D and permit deletion of an unmerged branch. A checked-out branch is refused even with force=true.
application/json- body
Create or delete one named branch.
force?booleanForce deletion of an unmerged branch using git branch -D.
Defaults to false: deletion uses git branch -d, refusing an unmerged
branch with 409 CONFLICT. Ignored when creating a branch.
name?stringBranch name to create or delete. A leading + is a literal part of the
name, not a refspec force marker.
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 are never returned. Optional depth (1–2147483647) performs a shallow clone; insecureSkipTls=true disables TLS verification for this request only. A non-empty destination is rejected with BAD_REQUEST.
application/json- body
Clone a repository into a target directory.
branch?|Branch to clone when commit_id is omitted. A leading + is literal.
commit_id?|Commit to detach to after cloning.
depth?|Optional shallow-clone depth, from 1 through 2147483647.
1 clones only the tip commit. Values representable as u32 but outside
this range return 400 BAD_REQUEST; invalid JSON types or values outside
u32 return 422 UNPROCESSABLE_ENTITY.
int321 <= value <= 2147483647insecureSkipTls?|Skip TLS certificate verification for this clone invocation only.
password?|Password for authenticated remotes; write-only and never returned.
path?stringDestination path to clone into.
url?stringRepository URL or local source path to clone.
username?|Username for authenticated remotes; write-only and never returned.
Repository cloned
curl -X POST 'http://sandbox:2280/git/clone' \ -H 'Content-Type: application/json' \ -d '{}'Create one commit and return its full SHA from the commit operation itself, not a later read of HEAD. Concurrent commits in linked worktrees or checkouts cannot substitute a different commit's SHA. Author identity is passed to git for this invocation only and is not written into repository config. Nothing to commit without allow_empty returns 400 BAD_REQUEST.
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 SHA of this operation's created commit, captured from git's commit output rather than a later read of HEAD.
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. A repository with no commits returns 400 BAD_REQUEST.
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" }]Initialize a Git repository and return its creation status.
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.
A leading + is a literal part of the branch name, never a force flag.
password?|Password for authenticated remotes; write-only and never returned.
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 and never returned.
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.
A leading + is a literal part of the branch name, never a force flag.
password?|Password for authenticated remotes; write-only and never returned.
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 and never returned.
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" } ]}