ProjectStack
git

error: cannot pull with rebase: you have unstaged changes

You're running git pull --rebase (or have rebase as the default pull strategy) but your working tree has uncommitted changes. Rebase needs a clean starting point.

Common causes

  • You edited files and haven't committed or stashed before pulling
  • Your git config has pull.rebase=true globally or for this branch
  • An editor or build tool modified tracked files
  • You ran git pull in the middle of active development work

How to fix it

  1. Stash your changes: git stash, then git pull --rebase, then git stash pop
  2. Or commit first: git add . && git commit -m 'WIP', then pull
  3. Pull without rebase: git pull --no-rebase origin <branch>
  4. Check what's modified: git status

Example

error: cannot pull with rebase: you have unstaged changes error: please commit or stash them.

Running git pull --rebase with uncommitted edits in the working tree

Have a different error?

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