mirror of
https://github.com/git-learning-game/oh-my-git.git
synced 2025-05-01 20:42:01 +02:00
Clear button, show arrow target if there's no node, add some goals
This commit is contained in:
parent
1ea6e3b4ac
commit
b1d2536bcc
10 changed files with 61 additions and 9 deletions
levels
11
levels/05-ref/goal
Normal file
11
levels/05-ref/goal
Normal 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
|
|
@ -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
5
levels/06-symref/goal
Normal 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
|
Loading…
Add table
Add a link
Reference in a new issue