Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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...)

like image 245
ekolis Avatar asked Aug 06 '19 13:08

ekolis


People also ask

How do I stash changes in Visual Studio 2019?

In the Team Explorer, after you have made your changes, enter the details into the message window of the Changes window of the Team Explorer. Then, click the Stash button. From the drop-down, select Stash All. After clicking Stash All, the created Stash will be shown, and the code branch will not have changes any more.

What does it mean to stash git changes?

git stash temporarily shelves (or stashes) changes you've made to your working copy so you can work on something else, and then come back and re-apply them later on.

How do I load a git stash?

Apply Git stashes In order to apply your Git stash to your current working directory, use the “git stash apply” command and specify the stash you want to apply. If you don't specify any arguments to the apply command, the top of the stack will be applied.


1 Answers

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.

like image 166
Scott Fletcher Avatar answered Sep 25 '22 16:09

Scott Fletcher