Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

git stash not working after windows reinstall

I recently re-installed windows. Now, when executing git stash on any of my github repositories, an error message is returned:

$ git stash
Cannot save the current worktree state

That's everything I get. Trying git -v stash was of no help as stash doesn't seem to have a verbose mode. There are no other changes stashed, and there's only one modified file:

$git stash list
$git status
On branch master
Changes not staged for commit:
  (use "git add <file>..." to update what will be committed)
  (use "git checkout -- <file>..." to discard changes in working directory)

        modified:   storage.h

no changes added to commit (use "git add" and/or "git commit -a")

I made sure to set user.name and user.email in my global config to the same values they had before and confirmed this using git log, git config user.name and git config user.email.

What can I do to alleviate this?

like image 979
iFreilicht Avatar asked Nov 07 '22 18:11

iFreilicht


1 Answers

I was getting into this problem today. I was using Windows 10 64bit OS and my Git was 64bit. You might be also seeing sh.exe.stackdump file is created in the current working directory.

The solution that worked for me:

I had to uninstall 64bit Git and installed 32bit Git from https://git-scm.com/download/win.

like image 194
Jijo John Avatar answered Nov 15 '22 04:11

Jijo John