Fix git backup

It now uses git stash, which is more reliable, and also lets us maintain the
state of the index!