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

Re: git checkout no longer warning about uncommitted/untracked files!

From
René Scharfe <rene.scharfe@lsrfire.ath.cx>
Date
May 23, 2011, 20:37 UTC
Message-ID
<4DDAC57D.9020809@lsrfire.ath.cx>
In-Reply-To
<1306171797211-6395441.post@n2.nabble.com>
Am 23.05.2011 19:29, schrieb funeeldy:
Show 5 quoted lines
> I found some other posts that seem to indicate that this is the right place
> to file bug reports for git.  If this is wrong, please let me know the
> proper method.
> We are using git version 1.7.3.  We just noticed that git checkout no longer
> warns about uncommitted/untracked files and just deletes them!!!
I can't reproduce this behaviour based on this description alone:
	$ git --version
	git version 1.7.3
	$ uname -a
	Linux ubuntu 2.6.38-8-generic #42-Ubuntu SMP Mon Apr 11 03:31:50 UTC 2011 i686 i686 i386 GNU/Linux
	$ mkdir /tmp/repo && cd /tmp/repo
	$ git init
	Initialized empty Git repository in /tmp/repo/.git/
	$ git config -l
	color.ui=auto
	user.name=René Scharfe
	user.email=rene.scharfe@lsrfire.ath.cx
	core.repositoryformatversion=0
	core.filemode=true
	core.bare=false
	core.logallrefupdates=true
	$ echo 1 >a
	$ git add a
	$ git commit -m.
	[master (root-commit) b0e60d3] .
	 1 files changed, 1 insertions(+), 0 deletions(-)
	 create mode 100644 a
	$ git branch x
	$ echo uncommitted >a
	$ echo untracked >b
	$ git checkout x
	M	a
	Switched to branch 'x'
	$ cat a
	uncommitted
	$ cat b
	untracked

Can you reconstruct what your colleague did, perhaps using his or her shell's command history file (e.g. ~/.bash_history)?

Previous: funeeldyNext: Jeff King
Message 2 of 8 in “git checkout no longer warning about uncommitted/untracked files!”
  1. funeeldyMay 23, 2011
  2. René ScharfeMay 23, 2011
  3. Jeff KingMay 23, 2011
  4. funeeldyMay 23, 2011
  5. funeeldyMay 23, 2011
  6. Jeff KingMay 23, 2011
  7. Marlene CoteMay 23, 2011
  8. Jeff KingMay 23, 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.