mirror of
https://github.com/git/git.git
synced 2024-11-17 22:44:49 +01:00
Revert "tutorial: update the initial commit example."
This reverts 5990efb0c4
commit.
This commit is contained in:
parent
2482d7d0ec
commit
b67b9b2034
1 changed files with 6 additions and 8 deletions
|
@ -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
|
on its standard input, and it will write out the resulting object name for the
|
||||||
commit to its standard output.
|
commit to its standard output.
|
||||||
|
|
||||||
And this is where we create the `.git/refs/heads/master` file
|
And this is where we create the `.git/refs/heads/master` file. This file is
|
||||||
which is pointed at by `HEAD`. This file is supposed to contain
|
supposed to contain the reference to the top-of-tree, and since that's
|
||||||
the reference to the top-of-tree of the master branch, and since
|
exactly what `git-commit-tree` spits out, we can do this all with a simple
|
||||||
that's exactly what `git-commit-tree` spits out, we can do this
|
shell pipeline:
|
||||||
all with a sequence of simple shell commands:
|
|
||||||
|
|
||||||
------------------------------------------------
|
------------------------------------------------
|
||||||
tree=$(git-write-tree)
|
echo "Initial commit" | \
|
||||||
commit=$(echo 'Initial commit' | git-commit-tree $tree)
|
git-commit-tree $(git-write-tree) > .git/refs/heads/master
|
||||||
git-update-ref HEAD $(commit)
|
|
||||||
------------------------------------------------
|
------------------------------------------------
|
||||||
|
|
||||||
which will say:
|
which will say:
|
||||||
|
|
Loading…
Reference in a new issue