20

Been working with Git every day for the last 3 years and never had a problem with it.
Enters Windows.Stash changes, tries a simple stash apply:

error: cannot stat *file_name*: Permission denied

Please tell me you are fucking kidding me.. I did not just fucking lose all that work..

:q life

Comments
  • 1
    OUCH :O
  • 1
    Unlikely, the permission denied might just be that you have something open that's locking a file. Visual Studio maybe? A third party git client?

    Failing that, stashes are stored as commits, with any luck you might be able to check out at the stash and just merge it into your branch?
  • 0
    @Sekhat will try second option, thank you!!
  • 0
    @Sunsette turns out you can just do

    git stash branch <branchname>

    To create a new branch from your most recent stash.

    Optionally you can specify a specific stash if it isn't at the top of your stack.

    Edit: missing a branch in the command
  • 0
    @Sunsette in case you missed it, edited my last post with the git command.
Add Comment