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...)
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.
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.
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.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With