Anonymous avatar Anonymous committed b67b9b2

Revert "tutorial: update the initial commit example."

This reverts 5990efb0c4f6d1a19c4702bf50ef8cc5ac902a78 commit.

Comments (0)

Files changed (1)

Documentation/tutorial.txt

 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:
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.