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
ZZorba <cr@altmore.co.uk>
Date
Dec 30, 2008, 21:04 UTC
Message-ID
<gje3ok$gnc$4@ger.gmane.org>
In-Reply-To
<gjdmm6$9oj$4@ger.gmane.org>

** REPRODUCING Possible bug rebooted PC, opened a new git bash, and started from scratch - see console output below

>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
Welcome to Git (version 1.6.0.2-preview20080923)

Run 'git help git' to display the help index. Run 'git help <command>' to display help for specific commands.

conorr@KINKLADZE /w/GITPLATFORM $ mkdir swproj

conorr@KINKLADZE /w/GITPLATFORM $ cd swproj

conorr@KINKLADZE /w/GITPLATFORM/swproj $ cat > ABC.txt ABC

conorr@KINKLADZE /w/GITPLATFORM/swproj $ cat > BC.txt BC

conorr@KINKLADZE /w/GITPLATFORM/swproj $ cat > AC.txt AC

conorr@KINKLADZE /w/GITPLATFORM/swproj $ cat > C.txt C

conorr@KINKLADZE /w/GITPLATFORM/swproj $ ls ABC.txt AC.txt BC.txt C.txt

conorr@KINKLADZE /w/GITPLATFORM/swproj $ git init Initialized empty Git repository in w:/GITPLATFORM/swproj/.git/

conorr@KINKLADZE /w/GITPLATFORM/swproj $ git add *a*.txt

conorr@KINKLADZE /w/GITPLATFORM/swproj
$ git commit -m "version A"
Created initial commit 2b88490: version A
 2 files changed, 2 insertions(+), 0 deletions(-)
 create mode 100644 ABC.txt
 create mode 100644 AC.txt

conorr@KINKLADZE /w/GITPLATFORM/swproj $ git tag versionA 2b88

conorr@KINKLADZE /w/GITPLATFORM/swproj $ git rm AC.txt rm 'AC.txt'

conorr@KINKLADZE /w/GITPLATFORM/swproj $ git add BC.txt

conorr@KINKLADZE /w/GITPLATFORM/swproj $ git status # On branch master # Changes to be committed: # (use "git reset HEAD <file>..." to unstage) # # deleted: AC.txt # new file: BC.txt # # Untracked files: # (use "git add <file>..." to include in what will be committed) # # C.txt

conorr@KINKLADZE /w/GITPLATFORM/swproj
$ git commit -m "version B"
Created commit c1e1cf8: version B
 2 files changed, 1 insertions(+), 1 deletions(-)
 delete mode 100644 AC.txt
 create mode 100644 BC.txt

conorr@KINKLADZE /w/GITPLATFORM/swproj $ git tag versionB c1e1

conorr@KINKLADZE /w/GITPLATFORM/swproj $ git add *c*.txt

conorr@KINKLADZE /w/GITPLATFORM/swproj
$ git commit -m "version C"
Created commit 66c62fd: version C
 1 files changed, 1 insertions(+), 0 deletions(-)
 create mode 100644 C.txt

conorr@KINKLADZE /w/GITPLATFORM/swproj $ git tag versionC 66c6

conorr@KINKLADZE /w/GITPLATFORM/swproj $ rm *.*

conorr@KINKLADZE /w/GITPLATFORM/swproj $ ls

conorr@KINKLADZE /w/GITPLATFORM/swproj
$ git commit -a -m "version D"
Created commit eee4a13: version D
 3 files changed, 0 insertions(+), 3 deletions(-)
 delete mode 100644 ABC.txt
 delete mode 100644 BC.txt
 delete mode 100644 C.txt

conorr@KINKLADZE /w/GITPLATFORM/swproj $ git tag versionD eee4

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

conorr@KINKLADZE /w/GITPLATFORM/swproj $ rm *.*

conorr@KINKLADZE /w/GITPLATFORM/swproj $ git checkout versionC .

conorr@KINKLADZE /w/GITPLATFORM/swproj $ ls ABC.txt AC.txt BC.txt C.txt

conorr@KINKLADZE /w/GITPLATFORM/swproj $ rm *.*

conorr@KINKLADZE /w/GITPLATFORM/swproj $ git checkout versionD .

conorr@KINKLADZE /w/GITPLATFORM/swproj $ ls ABC.txt AC.txt BC.txt C.txt

conorr@KINKLADZE /w/GITPLATFORM/swproj $ gitk

conorr@KINKLADZE /w/GITPLATFORM/swproj $ comment: gitk shows that versionA & C are correct, but B & D are wrong

Previous: ZorbaNext: Boyd Stephen Smith Jr.
Message 16 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.