# error: cannot pull with rebase: You have unstaged changes. Please commit or stash them.

**Code:** `cannot rebase` · **Category:** Git · **Seen on:** Git

A rebase (or pull --rebase) needs a clean working tree.

## 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.

---
Source: [WhatIsMyError](https://whatismyerror.com/errors/git/cannot-rebase-unstaged-changes)
