`fatal: It seems that there is already a rebase-merge directory, and I wonder if you are in the middle of another rebase.`
IntermediateTroubleshootingMerge and Rebase Problems
Answer
Likely causes → A previous rebase was interrupted (terminal closed, crash, conflict never resolved) and left state in .git/rebase-merge/.
Diagnose → git status ("interactive rebase in progress") and ls .git/rebase-merge.
Fix → Continue with git rebase --continue, abort with git rebase --abort, or keep the current HEAD and drop the state with git rebase --quit. If Git cannot read the state, remove .git/rebase-merge after saving anything important and check the branch with git reflog.
Prevent → Do not run two Git processes in the same repo (IDE plus terminal).
More on Merge and Rebase Problems
Production failed to start, and the file contains `<<<<<<< HEAD` lines that were committed.Beginner`error: you need to resolve your current index first`Beginner`fatal: You have not concluded your merge (MERGE_HEAD exists).`BeginnerRebase stops: `error: could not apply 1a2b3c4... Add retry` and later `No changes - did you forget to use 'git add'?`Intermediate`CONFLICT (modify/delete): config/old.yml deleted in HEAD and modified in feature.`Intermediate`CONFLICT (file/directory): There is a directory with name docs in HEAD. Adding docs as docs~feature instead.`Intermediate