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

git stash push --patch offers skip-worktree hunks

From
DLDaniel Lublin <daniel@lublin.se>
Date
Jan 27, 2021, 08:23 UTC
Message-ID
<rur7en$16bk$1@ciao.gmane.io>
Hi,
I'm using this to hide some locally modified files from accidental commit:
  git update-index --skip-worktree ...

Doing `git stash push` does not result in the above modifications being stashed. But, doing `git stash push --patch` asks me about hunks in the files which were flagged to skip-worktree. Instinctively, this feels wrong. The docs also say:

  Interactively select hunks from the diff between HEAD and the working tree
  to be stashed.
What do you think?
regards,
-- 
Daniel
lublin.se
Next: brian m. carlson
Message 1 of 2 in “git stash push --patch offers skip-worktree hunks”
  1. Daniel LublinJan 27, 2021
  2. brian m. carlsonJan 27, 2021

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.