How do you tell git to stash the index only?

The closest thing I've found is git stash --patch. It walks you through each of the changes to working tree and index letting you choose what to stash.

http://www.kernel.org/pub/software/scm/git/docs/git-stash.html


Why not cheat?

git stash --keep-index

to get everything out of there that's not in the index currently. Then,

git stash

to get a stash with just the stuff that's staged.

git stash pop

the first stash, add your changes. Then,

git commit --amend ...
git reset --hard

to clean up the working tree and then

git stash pop --index

to get your index changes back.