Revert "tutorial: update the initial commit example."
This reverts 5990efb0c4f6d1a19c4702bf50ef8cc5ac902a78 commit.
Junio C Hamano committed
Oct 15, 2005 at 17:03 UTC
b67b9b2034fc8983e796437034ab71cfce162d0b
1 file changed
+6
-8
Documentation/tutorial.txt
+6
-8
@@ -293,16 +293,14 @@ also wants to get a commit message
293
on its standard input, and it will write out the resulting object name for the
294
commit to its standard output.
295
296
-And this is where we create the `.git/refs/heads/master` file
297
-which is pointed at by `HEAD`. This file is supposed to contain
298
-the reference to the top-of-tree of the master branch, and since
299
-that's exactly what `git-commit-tree` spits out, we can do this
300
-all with a sequence of simple shell commands:
296
+And this is where we create the `.git/refs/heads/master` file. This file is
297
+supposed to contain the reference to the top-of-tree, and since that's
298
+exactly what `git-commit-tree` spits out, we can do this all with a simple
299
+shell pipeline:
300
301
------------------------------------------------
303
-tree=$(git-write-tree)
304
-commit=$(echo 'Initial commit' | git-commit-tree $tree)
305
-git-update-ref HEAD $(commit)
302
+echo "Initial commit" | \
303
+ git-commit-tree $(git-write-tree) > .git/refs/heads/master
304
------------------------------------------------
305
306
which will say: