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}
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| main_branch | No | main | |
| strategy | No | merge |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||