git rebase --abort — cancel a rebase in progress
Quick Answer
git rebase --abort
When this happens
CONFLICT (content): Merge conflict in src/app.ts
error: could not apply abc1234... my commit
hint: Resolve all conflicts manually, mark them as fixed with
hint: "git add/rm <conflicted_files>", then run "git rebase --continue".
The rebase hit a conflict you do not want to resolve right now. --abort restores your branch exactly as it was before you ran git rebase.
Other causes & fixes
Continue the rebase after resolving conflicts
# Edit conflicted files, then:
git add .
git rebase --continue
Skip a single conflicting commit
If a commit is no longer relevant (e.g., already applied upstream), you can skip it.
git rebase --skip
Check whether a rebase is in progress
ls .git/rebase-merge 2>/dev/null && echo "rebase in progress" || echo "no rebase"
Related