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

Re: stash push/pop unstages files?

From
YYuri <yuri@rawbw.com>
Date
Sep 5, 2021, 19:02 UTC
Message-ID
<5f09cba9-b7dc-d7b6-1d3f-e7fb8ca28c6c@rawbw.com>
In-Reply-To
<CAPx1Gvc6noTDYPt9x3b4_TE0z8-KE5cB6KQHcn5UL9pi0cKoGg@mail.gmail.com>
On 9/5/21 10:15 AM, Chris Torek wrote:
> It does,*provided*  you invoke the pop step with `--index`.
>
> When `git stash push` makes a stash, it saves both the index
> (staging area) and working tree, as two separate commits.

Why 'stash push' and 'stash pop' are asymmetric in what they do by default? Wouldn't it make more sense to make 'stash pop' precisely revert what 'stash push' does, and have an option '--no-index' instead?

Yuri
Previous: Chris TorekNext: Chris Torek
Message 3 of 4 in “stash push/pop unstages files?”
  1. YuriSep 5, 2021
  2. Chris TorekSep 5, 2021
  3. YuriSep 5, 2021
  4. Chris TorekSep 5, 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.