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

Re: Stashing untracked files

From
Johannes Schindelin <johannes.schindelin@gmx.de>
Date
Sep 29, 2007, 21:51 UTC
Message-ID
<Pine.LNX.4.64.0709292248400.28395@racer.site>
In-Reply-To
<EEE8F630-AE62-4425-96A0-239D54724DF4@lrde.epita.fr>
Hi,
On Sat, 29 Sep 2007, Benoit SIGOURE wrote:
Show 9 quoted lines
> On Sep 29, 2007, at 11:03 PM, Johannes Schindelin wrote:
> 
> > Instead this is what you _should_ do:
> > 
> > git add <the files that you care about>
> > git stash
> 
> You could stash untracked files that are not ignored (I personally 
> ignore *.o, *.a and the like).

And what if you happen to forget to ignore that? Or if you happen to have an strace log in some file (which you did not ignore either)?

Thanks, but I think the semantics of git stash is pretty well defined. And it means that you stash away _tracked_ content that was not yet committed.

I mean, you can have your desired behaviour with

$ git add . $ git stash

but if we were to fulfil your wish and change the default behaviour, there is no way back to the current behaviour (which I happen to find pretty sane).

Ciao, Dscho

Previous: Wincent ColaiutaNext: Tom Prince
Message 9 of 13 in “Stashing untracked files”
  1. Neil MacnealeSep 29, 2007
  2. Johannes SchindelinSep 29, 2007
  3. Benoit SIGOURESep 29, 2007
  4. Neil MacnealeSep 29, 2007
  5. Johannes SchindelinSep 29, 2007
  6. Neil MacnealeSep 30, 2007
  7. Steffen ProhaskaSep 30, 2007
  8. Wincent ColaiutaSep 30, 2007
  9. Johannes SchindelinSep 29, 2007
  10. Tom PrinceSep 29, 2007
  11. Johannes SchindelinSep 29, 2007
  12. Tom TobinSep 30, 2007
  13. Johannes SchindelinSep 30, 2007

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.