Home·Error messages

git · Git

The message

You are currently rebasing branch 'feature' on '8a3f21c'.

What it means

A rebase started and stopped partway, and HEAD is parked on a temporary state rather than on your branch. You see this line after a conflict during the rebase, or after an edit or break stop in git rebase -i, when you went off and did something else instead of finishing. Resolve the conflict, git add it and continue with git rebase --continue, or use --skip if you mean to drop that commit. git rebase --abort puts you back exactly where you were before the rebase, so no committed work is lost, but the conflict resolutions you have done so far go with it.

The fix

git rebase --abort
Printed by
git
Git
29

Almost every git error is a refusal that means "doing that from this state would lose something"; fatal: means git stopped without changing anything, and the hint: lines under the first line usually carry the actual remedy.

Reading an error message

  • Read from the first line down. The lower you go the more it is about the tool’s internals; the cause is usually at the top.
  • If there is a file and a line number, start there — not the top stack frame, but the topmost line that names a file you wrote.
  • Search the message verbatim, but strip your own paths and variable names first; those are what stop the search from matching.
  • The same condition is worded differently across tool versions. If results look wrong, add the version number to the query.
  • Before pasting a fix, check what it throws away. Some of these cannot be undone.

Common questions

Q. What does “You are currently rebasing branch 'feature' on '8a3f21c'.” mean?

A rebase started and stopped partway, and HEAD is parked on a temporary state rather than on your branch. You see this line after a conflict during the rebase, or after an edit or break stop in git rebase -i, when you went off and did something else instead of finishing. Resolve the conflict, git add it and continue with git rebase --continue, or use --skip if you mean to drop that commit. git rebase --abort puts you back exactly where you were before the rebase, so no committed work is lost, but the conflict resolutions you have done so far go with it.

Q. How do I fix it?

git rebase --abort — before running it, check the explanation above for what this command discards.

Q. Which tool prints this?

git. It sits under Git, and the message runs to 8 words.

Errors nearby