SourceTree will not apply a stash

asle9634 July 31, 2013

When I attempt to apply a stash in SourceTree it returns this error:

git -c diff.mnemonicprefix=false -c core.quotepath=false stash apply stash@{0}

fatal: ambiguous argument 'stash@0': unknown revision or path not in the working tree.

Use '--' to separate paths from revisions

I'm able to successfully apply the stash using Git. Is there something I need to do to get stash working in SourceTree?

3 answers

1 vote
mazdac April 12, 2015

It's windows command line or cygwin problem, because { and } are special characters (I've got cygwin64 with git installed - set as system git - and got same problem).

You can reproduce it using cmd.exe and executing command: "git apply stash@{0}", when you add backslashes: "git apply stash@\{0\}" then it works fine.

Using embedded git solves the problem/

0 votes
KieranA
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 31, 2013

Hi Chris. Is this for Windows or Mac? Also, are you using embedded Git or system Git?

0 votes
asle9634 July 31, 2013

This is on Windows and I'm using system Git.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events