Hi Am a frequent mercurial user, and an occasional git user. I usually use emacs for dealing with git.
Now I could curious and wrote a small script which generates a mercurial repository with 3 commits. ,---- | hg init | echo 1 > 1 | hg add | hg commit -m 1 | echo 1.1 > 1 | hg commit -m 1.1 | echo 1.2 > 1 | hg commit -m 1.2 `---- The result is the following graph: @ commit: 2:75f48e3e63ca | Branch: default | tag: tip | user: Uwe Brauer <o...@mat.ucm.es> | Date: Wed, 20 Nov 2019 14:53:22 +0100 | Phase: draft | summary: 1.2 | o commit: 1:aaf2164f69db | Branch: default | user: Uwe Brauer <o...@mat.ucm.es> | Date: Wed, 20 Nov 2019 14:53:22 +0100 | Phase: draft | summary: 1.1 | o commit: 0:a5263347872e Branch: default user: Uwe Brauer <o...@mat.ucm.es> Date: Wed, 20 Nov 2019 14:53:22 +0100 Phase: draft summary: 1 Now I wanted to do the same with git, So I tried out ,---- | git init | echo 1 > 1 | git add 1 | git commit -m 1 | echo 1.1 > 1 | git commit -m 1.1 | echo 1.2 > 1 | git commit -m 1.2 `---- But this results in * commit 8ed1eadffbf1ed72ebfa87fdf940db52af22e9fd (HEAD -> master) Author: Uwe Brauer <o...@mat.ucm.es> Date: Wed Nov 20 14:55:09 2019 +0100 1 so I have only ONE commit. After looking up older emails I found git init echo 1 > 1 git add 1 git commit -m 1 echo 1.1 > 1 git add . git commit -m 1.1 echo 1.2 > 1 git add . git commit -m 1.2 Resulting in * commit f70fd13dd0403de3ffbb7f539e2c18e90adfc79c (HEAD -> master) | Author: Uwe Brauer <o...@mat.ucm.es> | Date: Wed Nov 20 14:56:34 2019 +0100 | | 1.2 | * commit 77fbae56615d18a09e515e9da0b9a0a33829ce8b | Author: Uwe Brauer <o...@mat.ucm.es> | Date: Wed Nov 20 14:56:34 2019 +0100 | | 1.1 | * commit 0b816f009a759e3f29e5dd026210951da348cdb6 Author: Uwe Brauer <o...@mat.ucm.es> Date: Wed Nov 20 14:56:34 2019 +0100 1 Which is git equivalent of the mercurial repository. But I am totally puzzled. What the heck is git add . Supposed to do, I added text to one file and committed, why didn't these 2 last commit not work? -- You received this message because you are subscribed to the Google Groups "Git for human beings" group. To unsubscribe from this group and stop receiving emails from it, send an email to git-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/git-users/87wobusl8q.fsf%40mat.ucm.es.
smime.p7s
Description: S/MIME cryptographic signature