Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

git-stash cannot be used without a working tree error

Tags:

git

I use git 2.7.2.windows.1. I encounter "C:\Program Files\Git\mingw64/libexec/git-core\git-stash cannot be used without a working tree." when I try to use git-stash command.

git worktree list command output:

E:/Git Repositories/test-desktop-client  63bb5ca [master]

How can I resolve this problem?

like image 459
Dreamcatcher Avatar asked Feb 12 '26 01:02

Dreamcatcher


1 Answers

Try:

$ git --work-tree=. stash
like image 74
mvanle Avatar answered Feb 13 '26 16:02

mvanle



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!