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

RE: for newbs = little exercise / tutorial / warmup for windows and other non-sophisticated new Git users :-) [Scanned]

From
CRConor Rafferty <conor.rafferty@altmore.co.uk>
Date
Dec 30, 2008, 22:21 UTC
Message-ID
<BB5F02FD3789B54E8964D38D6775E718242D31@ALTMORE-SVR.altmore.local>

I don't understand, sorry. I thought I'd already removed all files from the local tree, in the $ rm *.* move just above the checkout

-----Original Message-----
From: Boyd Stephen Smith Jr. [mailto:bss@iguanasuicide.net] 
Sent: 30 December 2008 21:49
To: Conor Rafferty
Cc: git@vger.kernel.org
Subject: Re: for newbs = little exercise / tutorial / warmup for windows
and other non-sophisticated new Git users :-) [Scanned]
On Tuesday 2008 December 30 15:27:33 you wrote:
> conorr@KINKLADZE /w/GITPLATFORM/swproj $ git status # On branch master
Show 11 quoted lines
> nothing to commit (working directory clean)
>
> conorr@KINKLADZE /w/GITPLATFORM/swproj $ git checkout versionA .
>
> conorr@KINKLADZE /w/GITPLATFORM/swproj $ ls ABC.txt  AC.txt
>
> conorr@KINKLADZE /w/GITPLATFORM/swproj $ rm *.*
>
> conorr@KINKLADZE /w/GITPLATFORM/swproj $ git checkout versionB .
>
> conorr@KINKLADZE /w/GITPLATFORM/swproj $ ls ABC.txt  AC.txt  BC.txt

Not a bug. git checkout <commit> <paths> does not delete files by design. Try using "git checkout versionB" instead (no paths specified), and it will properly remove AC.txt from your working tree as well as warning you that "You're Doing It Wrong" (tm).

-- 
Boyd Stephen Smith Jr.                     ,= ,-_-. =. 
bss@iguanasuicide.net                     ((_/)o o(\_))
ICQ: 514984 YM/AIM: DaTwinkDaddy           `-'(. .)`-' 
http://iguanasuicide.net/                      \_/     
Next: Boyd Stephen Smith Jr.
Message 1 of 4 in “RE: for newbs = little exercise / tutorial / warmup for windows and other non-sophisticated new Git users :-) [Scanned]”
  1. Conor RaffertyDec 30, 2008
  2. Boyd Stephen Smith Jr.Dec 30, 2008
  3. Daniel BarkalowDec 31, 2008
  4. Jeff WhitesideDec 31, 2008

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.