I'm using magit 20160517.838, Emacs

I just upgraded magit from 20160320 to 20160517 and when I try to stash I now get this issue;

magit-stash-create: Cannot save the current index state

I can still manually stash on the command line with

git stash


I've put the debug into my init.el file

(setq magit-git-debug t)

Then I restarted emacs and tried stashing again but no debug console is displayed. I get the following error in my *magit-process file.

128 git … commit-tree --no-gpg-sign -m index on master: 917b40b Revert "electric-pair-mode failed with python files." -p HEAD 8e2cbf3020c9c4d509f98a1924f3d43ba0ed4f12
fatal: Not a valid object name --no-gpg-sign

I think I require updating my git as I'm running an old version '1.9.1'

  • 3
    Do (setq magit-git-debug t) and then use $ to see whether you get a more useful error message in the process buffer.
    – tarsius
    Commented May 18, 2016 at 6:36
  • The failing command is git commit-tree.
    – tarsius
    Commented May 18, 2016 at 7:18
  • 1
    If you don't help me help you, then I have nothing to work with.
    – tarsius
    Commented May 23, 2016 at 13:09

2 Answers 2


Indeed Magit does require at least Git v1.9.4.

  • I am using git 1.9.4, and I also get this error: fatal: Not a valid object name --no-gpg-sign.
    – md5i
    Commented Feb 24, 2017 at 19:18

This could also be due to not having configured git properly:

  git config --global user.email "[email protected]"
  git config --global user.name "Your Name"

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.