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 :-)

From
Boyd Stephen Smith Jr. <bss@iguanasuicide.net>
Date
Dec 30, 2008, 21:49 UTC
Message-ID
<200812301549.26538.bss@iguanasuicide.net>
In-Reply-To
<gje3ok$gnc$4@ger.gmane.org>
On Tuesday 2008 December 30 15:27:33 you wrote:
Show 21 quoted lines
> conorr@KINKLADZE /w/GITPLATFORM/swproj
> $ git status
> # On branch master
> 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/                      \_/     
Previous: ZorbaNext: Boyd Stephen Smith Jr.
Message 17 of 21 in “for newbs = little exercise / tutorial / warmup for windows and other non-sophisticated new Git users :-)”
  1. ZorbaDec 27, 2008
  2. ZorbaDec 28, 2008
  3. Jeff WhitesideDec 29, 2008
  4. ZorbaDec 30, 2008
  5. Jeff WhitesideDec 30, 2008
  6. ZorbaDec 30, 2008
  7. Sitaram ChamartyDec 30, 2008
  8. ZorbaDec 30, 2008
  9. ZorbaDec 30, 2008
  10. ZorbaDec 30, 2008
  11. Jeff WhitesideDec 30, 2008
  12. ZorbaDec 30, 2008
  13. Jeff WhitesideDec 30, 2008
  14. Daniel BarkalowDec 30, 2008
  15. ZorbaDec 31, 2008
  16. ZorbaDec 30, 2008
  17. Boyd Stephen Smith Jr.Dec 30, 2008
  18. Boyd Stephen Smith Jr.Dec 30, 2008
  19. Boyd Stephen Smith Jr.Dec 30, 2008
  20. Sitaram ChamartyDec 31, 2008
  21. Daniel BarkalowDec 30, 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.