cannot rebase 🌿 Git

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

  1. Commit or stash first
  2. Use autostash: git pull --rebase --autostash

Detailed fix by platform

Git

  1. git config --global rebase.autoStash true

How to diagnose

  1. Status — git status shows changes?
  2. 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.