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

Re: Stashing untracked files

From
Steffen Prohaska <prohaska@zib.de>
Date
Sep 30, 2007, 08:41 UTC
Message-ID
<E505AC4A-FDCB-4D9D-9CF7-C68CBC20BFFD@zib.de>
In-Reply-To
<46FF1F1E.2050000@theory.org>
On Sep 30, 2007, at 5:59 AM, Neil Macneale wrote:
Show 7 quoted lines
> git stash is an acknowledgment that not everything needs to be  
> committed, and sometimes working source trees are messy. Prior to  
> the stash command, I just accepted that I'd need to commit  
> everything and do  some maintenance to un-commit those changes.  
> stash is awesome for me and the realities of the way I need to  
> work. IMHO, it would be the best thing since sliced bread if it  
> handled untracked files.

I agree, it could be a great tool. Even only to make me feel better before running 'git clean' on a larger source tree when I was to lazy to scan 'git clean -n' in detail.

BTW, I don't have results of the builds in my work tree but keep them in a separate directory. Nearly everything in the work tree is 'real' source code, maybe cluttered with some backups or tmp files.

> If this is really just a problem for me, I can write a shell script  
> to do the dirty work. I just wonder if it is a common enough use  
> case that it merits support in the tool itself.
I think it would be useful. Here is a problem I ran into last week:

A merge failed because it wanted to add a file not tracked by the current branch. At first I didn't fully appreciate this fact and thought that 'git stash' could help. But to do so, it would need to store the _untracked_ file and remove it from the work tree. This would allow the merge to succeed. Current stash didn't really help.

	Steffen
Previous: Neil MacnealeNext: Wincent Colaiuta
Message 7 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.