error: cannot pull with rebase: You have unstaged changes. Please commit or stash them.
A rebase (or pull --rebase) needs a clean working tree.
Seen on:
Git
Meaning
Git won’t replay commits over uncommitted changes.
Common causes
- Uncommitted edits
- pull.rebase=true with local changes
⚡ Quick fix
- Commit or stash first
- Use autostash: git pull --rebase --autostash
Detailed fix by platform
Git
git config --global rebase.autoStash true
How to diagnose
- Status — git status shows changes?
- Recent change — Did it start after a deploy, upgrade, or configuration change? Compare with the last working version.
🧠 Still stuck? Analyze your error
Paste the full message, response headers or stack trace — we'll detect the platform and point to the most likely cause.
Was this page helpful?
Report a correction or suggest an improvement
Last updated 2 Oct 2026