git_sync_with_main
Syncs the current branch with the main branch by fetching latest and merging or rebasing. Prevents sync when on main branch or with uncommitted changes.
Instructions
Sync current branch with main. Fetches latest and merges/rebases.
Options:
main_branch: branch to sync from (default: "main")
strategy: "merge" (default) or "rebase"
Fails if on main branch or has uncommitted changes.
Returns: {branch, main_branch, strategy, sha_before, sha_after, commits_added, up_to_date, files_changed}
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "git_sync_with_main"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| main_branch | No | main | |
| strategy | No | merge |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||