ProjectStack
git

error: you need to resolve your current index first

You're trying to do something (like checkout or merge) while your index still contains unresolved merge conflicts. You must finish resolving before Git will let you proceed.

Common causes

  • A previous merge or pull left conflicts unresolved
  • You ran git merge or git rebase and didn't finish resolving all conflicts
  • Trying to switch branches in the middle of a conflicted merge
  • Trying to stash while merge conflicts are present in the index

How to fix it

  1. Check which files still have conflicts: git status
  2. Open each conflicted file, resolve the markers, then: git add <file>
  3. Complete the merge after resolving all files: git commit
  4. To abort the entire merge and go back: git merge --abort

Example

error: you need to resolve your current index first

Running git checkout or another command while in the middle of a conflicted merge

Have a different error?

Paste any error message into the Error Translator to get an instant explanation.