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

Re: [PATCH] stash: Add --clean option to stash and remove all untracked files

From
Johannes Sixt <j.sixt@viscovery.net>
Date
Jun 21, 2011, 06:28 UTC
Message-ID
<4E003A0F.5080601@viscovery.net>
In-Reply-To
<4E002762.3050803@sohovfx.com>
Am 6/21/2011 7:08, schrieb Andrew Wong:
Show 17 quoted lines
> Ah, this patch will be very useful. I actually ran into several scenarios
> before where I wished stash could do exactly this.
> 
> On 11-06-20 9:36 PM, David Caldwell wrote:
>> On 6/20/11 5:38 PM, Jeff King wrote:
>>> Hmm. I think I would call this something like "--untracked", as to me
>>> the main function is saving those files, not cleaning them afterwards
>>> (the fact that they are cleaned is really just making the untracked-file
>>> handling in line with what we do for tracked files; we put the changes
>>> in the stash and remove them from the working tree).
>>
>> I see your point but I thought "--clean" was pretty descriptive of how
>> the working dir ended up afterward. Maybe "git stash --everything" (or
>> "--all")?
> I personally think "--untracked" (and -u) is more intuitive too, since it
> tells you what "git stash" is about to do. i.e. "git stash" is about to do
> the usual stash operation *and* also stash the "untracked" files.
Really?
   $ git stash --untracked

sound like it stashes *only* untracked files. (That by itself may be a feature that some people want; so far, I'm not among them.)

-- Hannes
Previous: Andrew WongNext: Jeff King
Message 5 of 15 in “stash: Add --clean option to stash and remove all untracked files”
  1. stash: Add --clean option to stash and remove all untracked filesDavid Caldwell, Jun 20, 2011
  2. Jeff KingJun 21, 2011
  3. David CaldwellJun 21, 2011
  4. Andrew WongJun 21, 2011
  5. Johannes SixtJun 21, 2011
  6. Jeff KingJun 21, 2011
  7. Paul EbermannJun 21, 2011
  8. Marc BranchaudJun 21, 2011
  9. Miles BaderJun 22, 2011
  10. Jeff KingJun 22, 2011
  11. Junio C HamanoJun 21, 2011
  12. stash: Add --include-untracked option to stash and remove all untracked filesDavid Caldwell, Jun 24, 2011
  13. Matthieu MoyJun 24, 2011
  14. stash: Add --include-untracked option to stash and remove all untracked filesDavid Caldwell, Jun 25, 2011
  15. Junio C HamanoJun 26, 2011

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.