git_merge
Merge a branch into the current branch, integrating commits with or without a merge commit. Use to bring a feature branch back into its base or squash work into a single commit.
Instructions
Merge a branch into the current branch, integrating its commits with or without a merge commit. Use this to bring a feature branch back into its base when histories have diverged, or to squash a branch's work into one commit with squash=True. Does NOT rewrite the current branch's history — use git_rebase for that; use git_cherry_pick to port specific commits instead of a whole branch. Best for: integrating a feature branch back into the base branch. Returns: git merge output text; conflicts raise a ValueError with details — resolve them and retry.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| branch | Yes | Branch to merge | |
| squash | No | Squash commits into a single merge | |
| repo_path | No | Path to the git repository, defaults to '.' (the server working directory) | . |
| no_fast_forward | No | Create a merge commit even if fast-forward is possible |