diff options
| author | Junio C Hamano <junkio@cox.net> | 2005-10-15 17:03:30 -0700 |
|---|---|---|
| committer | Junio C Hamano <junkio@cox.net> | 2005-10-15 17:03:30 -0700 |
| commit | b67b9b2034fc8983e796437034ab71cfce162d0b (patch) | |
| tree | fd2b5c0b9da48a051030b5d167d82f7dba9a0417 | |
| parent | 2482d7d0ecfe70a14b450e7028954f3b676f477a (diff) | |
| download | git-b67b9b2034fc8983e796437034ab71cfce162d0b.tar.xz | |
Revert "tutorial: update the initial commit example."
This reverts 5990efb0c4f6d1a19c4702bf50ef8cc5ac902a78 commit.
| -rw-r--r-- | Documentation/tutorial.txt | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/Documentation/tutorial.txt b/Documentation/tutorial.txt index 6ecb089c5c..00f4bab954 100644 --- a/Documentation/tutorial.txt +++ b/Documentation/tutorial.txt @@ -293,16 +293,14 @@ also wants to get a commit message on its standard input, and it will write out the resulting object name for the commit to its standard output. -And this is where we create the `.git/refs/heads/master` file -which is pointed at by `HEAD`. This file is supposed to contain -the reference to the top-of-tree of the master branch, and since -that's exactly what `git-commit-tree` spits out, we can do this -all with a sequence of simple shell commands: +And this is where we create the `.git/refs/heads/master` file. This file is +supposed to contain the reference to the top-of-tree, and since that's +exactly what `git-commit-tree` spits out, we can do this all with a simple +shell pipeline: ------------------------------------------------ -tree=$(git-write-tree) -commit=$(echo 'Initial commit' | git-commit-tree $tree) -git-update-ref HEAD $(commit) +echo "Initial commit" | \ + git-commit-tree $(git-write-tree) > .git/refs/heads/master ------------------------------------------------ which will say: |
