gitvisual-studiovisual-studio-2019

When I try to apply a certain git stash in VS2019, I get an error saying there are uncommitted changes (there aren't) and only one file is applied


Git operation failed because there are uncommitted changes. Commit or undo your changes before retrying. See the Output window for details.

However there are no uncommitted changes. One file that was added is restored from the stash, but that's it - the rest of them are stuck in limbo.

How can I get the rest of my files from the stash? (Short of opening them one by one and copypastaing them into my project...)


Solution

  • Running git status from my SourceTree terminal cleared up the error in Visual Studio. Even though the output of the command didn't show anything of interest:

    $ git status
    On branch develop
    Your branch is up to date with 'origin/develop'.
    
    nothing to commit, working tree clean
    

    ...but after doing that, Visual Studio let me apply the stash.