Clear button, show arrow target if there's no node, add some goals

This commit is contained in:
Sebastian Morr 2020-09-14 15:35:30 +02:00
parent 1ea6e3b4ac
commit b1d2536bcc
10 changed files with 61 additions and 9 deletions
levels
05-ref
06-symref

11
levels/05-ref/goal Normal file
View file

@ -0,0 +1,11 @@
echo hello > hello
echo world > world
BLOB1=$(git hash-object -w hello)
BLOB2=$(git hash-object -w world)
git add .
TREE=$(git write-tree)
COMMIT=$(git commit-tree $TREE -m "Initial commit")
git update-ref refs/a $BLOB1
git update-ref refs/b $BLOB2
git update-ref refs/c $TREE
git update-ref refs/d $COMMIT

View file

@ -4,6 +4,6 @@ When that happens, they are called "symbolic refs". You can create or update a s
git symbolic-ref <name> <ref>
Usually, you will only encounter a special symbolic ref called "HEAD". This ref is special in that it doesn't start with "refs/"!
Usually, you will only encounter a special symbolic ref called "HEAD". This ref is special in that it doesn't start with "refs/"! You might already have seen it in the other levels - it's the only thing that's always there!
Try pointing HEAD to the refs in this repository!

5
levels/06-symref/goal Normal file
View file

@ -0,0 +1,5 @@
TREE=$(git write-tree)
COMMIT=$(git commit-tree $TREE -m "Initial commit")
git update-ref refs/best_commit $COMMIT
git update-ref refs/worst_commit $COMMIT
git symbolic-ref HEAD refs/best_commit