Skip to content

git_push

MCP tools › Version control

Push a local branch (default current) to a remote (default its upstream's, else origin). Dry run by default: lists the commits the remote lacks, offline; dry_run=false needs the remote right. No plain force push: force_with_lease overwrites only if the remote branch still points at the given commit. Rejections return git's reason; missing credentials fail with auth_required. Azure DevOps SSH may report pq: false. Logged.

Its results carry text from git, web: the client is told to treat that as data, never as instructions.

Capabilitygit.git_push
AreaVersion control
Accesschanges repository, remote
Reachesprocess, network
Rightsremote, vcs-write
Dry rundry_run, on unless the call turns it off

Arguments

ArgumentTypeDescription
branchstringLocal branch (default: the current one).
remotestringRemote (default: the branch's upstream remote, else origin).
set_upstreambooleanRecord the pushed branch as upstream.
force_with_leasestringOverwrite the remote branch only if it still points at this commit (no plain force push).
dry_runbooleanOnly list the commits that would be sent, without network (default true).
targetstringBranch name on the remote (default: the local name); current branch only.
tagsbooleanAlso push the annotated and lightweight tags on the pushed history; current branch only.

Call it from a shell

ferris-idea call runs one tool with the rights and safe mode of ferris-idea mcp. Replace the folder and the placeholder values.

Terminal window
ferris-idea call ~/my-project git_push
Input schema as JSON
{
"type": "object",
"properties": {
"branch": {
"description": "Local branch (default: the current one).",
"type": [
"string",
"null"
]
},
"remote": {
"description": "Remote (default: the branch's upstream remote, else `origin`).",
"type": [
"string",
"null"
]
},
"set_upstream": {
"description": "Record the pushed branch as upstream.",
"type": [
"boolean",
"null"
]
},
"force_with_lease": {
"description": "Overwrite the remote branch only if it still points at this commit (no plain force push).",
"type": [
"string",
"null"
]
},
"dry_run": {
"description": "Only list the commits that would be sent, without network (default true).",
"type": [
"boolean",
"null"
]
},
"target": {
"description": "Branch name on the remote (default: the local name); current branch only.",
"type": [
"string",
"null"
]
},
"tags": {
"description": "Also push the annotated and lightweight tags on the pushed history; current branch only.",
"type": [
"boolean",
"null"
]
}
}
}