{"thread":{"id":"60168","subject":"Can not `git stash push -- .`","startedAt":"2023-08-29T19:12:54Z","lastAt":"2023-08-29T19:12:54Z","messageCount":1,"participants":["Eugen Konkov"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"481131","messageId":"CAHKPvkYtC88pEfACTXKM3a2CkbtMRjne9ZmAtF_+3K0KFZDXKw@mail.gmail.com","threadId":"60168","inReplyTo":null,"subject":"Can not `git stash push -- .`","fromName":"Eugen Konkov","fromEmail":"ekonkov@planitar.com","sentAt":"2023-08-29T19:11:52Z","receivedAt":"2023-08-29T19:12:54Z","isPatch":false,"sender":{"key":"ekonkov@planitar.com","avatar":null},"body":"I tried to stash staged files with the command above, but got an\nerror. I even change directory to the top level (where .git is\nlocated) and try to provide pathspec. Same result :(\n```\n$ git stash push -S -m \"core -> ubuntu Migration\" -- tools/ec2.tf\ntools/init.conf\nSaved working directory and index state On branch/xxx: core -> ubuntu Migration\nerror: patch failed: state.d/terraform.tfstate.backup:2\nerror: state.d/terraform.tfstate.backup: patch does not apply\nCannot remove worktree changes\n```\n\nIs there a way to stash only selected staged files from current\nsubdirectory, eg. `git diff --staged .`\n\nThank you.\n"}]}