Sometimes git stash fails even though I can manually make a backup of the project folder with the uncommitted changes, and then call "Undo Uncommitted Changes".
This happens, for example, if I add a new file foo.cpp
to my project. When I want to stash the changes later I get an error. This is from the Version Control output pane in Qt Creator:
14:07 Executing in C:\MyProject: git.exe add --intent-to-add foo.cpp
14:07 Executing in C:\MyProject: git.exe stash save QtCreator 2013-02-05T14:07:18
Cannot stash in "C:\MyProject": error: Entry 'foo.cpp' not uptodate. Cannot merge.
Cannot save the current worktree state
Isn't the point of git stash to automate this process, why would it fail when simply undoing the changes succeeds?