← All procedures
git.rebase
Rebase the current branch on another branch (not interactive). Conflicts give conflict: true
CLI- Package
- @procedures/git · README
- Path
["git","rebase"]- CLI
mark git rebase --upstream <string>- As data
{"$proc":["git","rebase"],"input":{}}
Use it
In TypeScript
import { Client, LocalTransport, PROCEDURE_REGISTRY } from "@procedures/client";
import "@procedures/git/register"; // registers its procedures
const client = new Client(new LocalTransport({ registry: PROCEDURE_REGISTRY }));
const result = await client.exec(["git","rebase"], { upstream: "<upstream>" });
console.log(JSON.stringify(result));From the command line
$ mark git rebase --upstream <string>
As data, in a program
{ "$proc": ["git", "rebase"], "input": { "upstream": "<upstream>" } }Input
Output
JSON Schemas
{
"input": {
"type": "object",
"properties": {
"upstream": {
"type": "string",
"description": "The branch or the commit to rebase on"
},
"onto": {
"description": "The new base of the commits, when it is not the upstream",
"type": "string"
},
"branch": {
"description": "The branch to rebase. Git checks it out first (default: the current branch)",
"type": "string"
},
"cwd": {
"description": "Working directory",
"type": "string"
}
},
"required": [
"upstream"
]
},
"output": {
"type": "object",
"properties": {
"hash": {
"type": "string",
"description": "HEAD after the call"
},
"completed": {
"type": "boolean",
"description": "True when the rebase is complete"
},
"upToDate": {
"type": "boolean",
"description": "True when nothing changed"
},
"conflict": {
"type": "boolean",
"description": "True when the rebase stopped on conflicts"
},
"conflicts": {
"description": "The files with conflicts",
"type": "array",
"items": {
"type": "string"
}
}
},
"required": [
"hash",
"completed",
"upToDate",
"conflict"
],
"additionalProperties": {}
}
}