core-tutorial: adjust to recent reality.
We still talked about HEAD symlinks but these days we use symrefs by default. Also 'failed/prevented' message is now gone from the merge output. Signed-off-by: Junio C Hamano <junkio@cox.net>
Junio C Hamano committed
Feb 6, 2006 at 12:27 UTC
960c7021b3b90f93aa88358435d828e5f4cd1533
1 file changed
+19
-22
Documentation/core-tutorial.txt
+19
-22
@@ -66,9 +66,9 @@ your new project. You will now have a `.git` directory, and you can
66
inspect that with `ls`. For your new empty project, it should show you
67
three entries, among other things:
68
69
- - a symlink called `HEAD`, pointing to `refs/heads/master` (if your
70
- platform does not have native symlinks, it is a file containing the
71
- line "ref: refs/heads/master")
69
+ - a file called `HEAD`, that has `ref: refs/heads/master` in it.
70
+ This is similar to a symbolic link and points at
71
+ `refs/heads/master` relative to the `HEAD` file.
72
+
73
Don't worry about the fact that the file that the `HEAD` link points to
74
doesn't even exist yet -- you haven't created the commit that will
@@ -89,7 +89,7 @@ of different 'heads' of development (aka 'branches'), and to any
89
repository.
90
91
One note: the special `master` head is the default branch, which is
92
-why the `.git/HEAD` file was created as a symlink to it even if it
92
+why the `.git/HEAD` file was created points to it even if it
93
doesn't yet exist. Basically, the `HEAD` link is supposed to always
94
point to the branch you are working on right now, and you always
95
start out expecting to work on the `master` branch.
@@ -133,8 +133,8 @@ $ echo "Hello World" >hello
133
$ echo "Silly example" >example
134
------------------------------------------------
135
136
-you have now created two files in your working tree (aka 'working directory'), but to
137
-actually check in your hard work, you will have to go through two steps:
136
+you have now created two files in your working tree (aka 'working directory'),
137
+but to actually check in your hard work, you will have to go through two steps:
138
139
- fill in the 'index' file (aka 'cache') with the information about your
140
working tree state.
@@ -173,8 +173,8 @@ and see two files:
173
.git/objects/f2/4c74a2e500f5ee1332c86b94199f52b1d1d962
174
----------------
175
176
-which correspond with the objects with names of 557db... and f24c7..
177
-respectively.
176
+which correspond with the objects with names of `557db...` and
177
+`f24c7...` respectively.
178
179
If you want to, you can use `git-cat-file` to look at those objects, but
180
you'll have to use the object name, not the filename of the object:
@@ -191,7 +191,7 @@ regular file), and you can see the contents with
191
$ git-cat-file "blob" 557db03
192
----------------
193
194
-which will print out "Hello World". The object 557db03 is nothing
194
+which will print out "Hello World". The object `557db03` is nothing
195
more than the contents of your file `hello`.
196
197
[NOTE]
@@ -530,8 +530,8 @@ various diff-\* commands compare things.
530
+-----------+
531
============
532
533
-More interestingly, you can also give `git-diff-tree` the `-v` flag, which
534
-tells it to also show the commit message and author and date of the
533
+More interestingly, you can also give `git-diff-tree` the `--pretty` flag,
534
+which tells it to also show the commit message and author and date of the
535
commit, and you can tell it to show a whole series of diffs.
536
Alternatively, you can tell it to be "silent", and not show the diffs at
537
all, but just show the actual commit message.
@@ -813,18 +813,12 @@ $ git checkout master
813
(or any other branch-name, for that matter) and if you forget which
814
branch you happen to be on, a simple
815
816
-------------
817
-$ ls -l .git/HEAD
818
-------------
819
-
820
-will tell you where it's pointing (Note that on platforms with bad or no
821
-symlink support, you have to execute
822
-
816
------------
817
$ cat .git/HEAD
818
------------
819
827
-instead). To get the list of branches you have, you can say
820
+will tell you where it's pointing. To get the list of branches
821
+you have, you can say
822
823
------------
824
$ git branch
@@ -863,7 +857,9 @@ $ git commit -m 'Some work.' hello
857
858
Here, we just added another line to `hello`, and we used a shorthand for
859
doing both `git-update-index hello` and `git commit` by just giving the
866
-filename directly to `git commit`. The `-m` flag is to give the
860
+filename directly to `git commit`, with an `-i` flag (it tells
861
+git to 'include' that file in addition to what you have done to
862
+the index file so far when making the commit). The `-m` flag is to give the
863
commit log message from the command line.
864
865
Now, to make it a bit more interesting, let's assume that somebody else
@@ -924,7 +920,7 @@ file, which had no differences in the `mybranch` branch), and say:
920
...
921
Auto-merging hello
922
CONFLICT (content): Merge conflict in hello
927
- Automatic merge failed/prevented; fix up by hand
923
+ Automatic merge failed; fix up by hand
924
----------------
925
926
which is way too verbose, but it basically tells you that it failed the
@@ -964,7 +960,7 @@ Another useful tool, especially if you do not always work in X-Window
960
environment, is `git show-branch`.
961
962
------------------------------------------------
967
-$ git show-branch master mybranch
963
+$ git show-branch --topo-order master mybranch
964
* [master] Merge work in mybranch
965
! [mybranch] Some work.
966
--
@@ -1006,6 +1002,7 @@ would be different)
1002
1003
----------------
1004
Updating from ae3a2da... to a80b4aa....
1005
+Fast forward
1006
example | 1 +
1007
hello | 1 +
1008
2 files changed, 2 insertions(+), 0 deletions(-)