git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Can not `git stash push -- .`

From
EKEugen Konkov <ekonkov@planitar.com>
Date
Aug 29, 2023, 19:11 UTC
Message-ID
<CAHKPvkYtC88pEfACTXKM3a2CkbtMRjne9ZmAtF_+3K0KFZDXKw@mail.gmail.com>

I tried to stash staged files with the command above, but got an error. I even change directory to the top level (where .git is located) and try to provide pathspec. Same result :( ``` $ git stash push -S -m "core -> ubuntu Migration" -- tools/ec2.tf tools/init.conf Saved working directory and index state On branch/xxx: core -> ubuntu Migration error: patch failed: state.d/terraform.tfstate.backup:2 error: state.d/terraform.tfstate.backup: patch does not apply Cannot remove worktree changes ```

Is there a way to stash only selected staged files from current subdirectory, eg. `git diff --staged .`

Thank you.
Message 1 of 1 in “Can not `git stash push -- .`”
  1. Eugen KonkovAug 29, 2023

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.