File tree Expand file tree Collapse file tree 1 file changed +8
-6
lines changed
Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -293,14 +293,16 @@ also wants to get a commit message
293293on its standard input, and it will write out the resulting object name for the
294294commit to its standard output.
295295
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:
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:
300301
301302------------------------------------------------
302- echo "Initial commit" | \
303- git-commit-tree $(git-write-tree) > .git/refs/heads/master
303+ tree=$(git-write-tree)
304+ commit=$(echo 'Initial commit' | git-commit-tree $tree)
305+ git-update-ref HEAD $(commit)
304306------------------------------------------------
305307
306308which will say:
You can’t perform that action at this time.
0 commit comments