Git Rebase
git_rebaseRebase branches onto upstream commits to create linear project history. Reapplies commits on new base tips with options for interactive mode and merge preservation.
Instructions
Rebase commits onto another branch. Reapplies commits on top of another base tip for a cleaner history.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | No | Path to the Git repository. Defaults to session working directory set via git_set_working_dir. | . |
| mode | No | Rebase operation mode: 'start', 'continue', 'abort', or 'skip'. | start |
| upstream | No | Upstream branch to rebase onto (required for start mode). | |
| branch | No | Branch to rebase (default: current branch). | |
| interactive | No | Interactive rebase (not supported in all providers). | |
| onto | No | Rebase onto different commit than upstream. | |
| preserve | No | Preserve merge commits during rebase. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| success | Yes | Indicates if the operation was successful. | |
| conflicts | Yes | Whether rebase had conflicts. | |
| conflictedFiles | Yes | Files with conflicts that need resolution. | |
| rebasedCommits | Yes | Number of commits that were rebased. | |
| currentCommit | No | Current commit hash if rebase stopped due to conflict. |