mirror of
https://github.com/git-learning-game/oh-my-git.git
synced 2025-05-07 05:02:04 +02:00
Rework levels, and add some new ones
This commit is contained in:
parent
931e9b3beb
commit
35b4dc098a
47 changed files with 163 additions and 39 deletions
levels/symref-create
|
@ -4,6 +4,4 @@ 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/"! 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!
|
||||
Create a symbolic ref called "refs/rainbow"!
|
||||
|
|
|
@ -1 +1,3 @@
|
|||
git symbolic-ref HEAD refs/best_commit
|
||||
BLOB=$(git hash-object -w --stdin)
|
||||
git update-ref refs/double "$BLOB"
|
||||
git symbolic-ref refs/rainbow refs/double
|
||||
|
|
|
@ -1,4 +0,0 @@
|
|||
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
|
|
@ -1 +1 @@
|
|||
git symbolic-ref HEAD | grep _commit
|
||||
git symbolic-ref refs/rainbow
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue