# error: could not apply <hash>... <commit-message> (rebase conflict)

- **ID:** `git/divergent-branch-rebase-conflict`
- **Domain:** git
- **Category:** runtime_error
- **Verification:** ai_generated
- **Fix Rate:** 88%

## Root Cause

A rebase operation encountered a merge conflict that cannot be automatically resolved because the current branch and the target branch have diverged, and the patch does not cleanly apply.

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| git 2.39.0 | active | — | — |
| git 2.40.1 | active | — | — |
| git 2.41.0 | active | — | — |

## Workarounds

1. **Manually edit the conflicted file to resolve conflict markers (<<<<<<<, =======, >>>>>>>), then run 'git add <file>' and 'git rebase --continue'** (90% success)
   ```
   Manually edit the conflicted file to resolve conflict markers (<<<<<<<, =======, >>>>>>>), then run 'git add <file>' and 'git rebase --continue'
   ```
2. **Use a mergetool like 'git mergetool' to visually resolve conflicts with KDiff3 or vimdiff, then continue the rebase** (85% success)
   ```
   Use a mergetool like 'git mergetool' to visually resolve conflicts with KDiff3 or vimdiff, then continue the rebase
   ```
3. **If the conflict is too complex, abort with 'git rebase --abort' and use 'git merge' instead, which may handle divergent histories more gracefully** (70% success)
   ```
   If the conflict is too complex, abort with 'git rebase --abort' and use 'git merge' instead, which may handle divergent histories more gracefully
   ```

## Dead Ends

- **** — Skipping the commit removes its changes permanently from the rebased branch, leading to data loss or incomplete integration. (65% fail)
- **** — Git will still detect unresolved conflicts because the conflict markers remain in the file, causing the rebase to abort or produce corrupted content. (80% fail)
- **** — This discards all uncommitted changes and the rebase state, but does not resolve the underlying divergence; the same conflict will reappear on next rebase attempt. (50% fail)
