mirror of
https://github.com/git-learning-game/oh-my-git.git
synced 2025-05-05 05:02:02 +02:00
Rename levels to avoid numbers
This commit is contained in:
parent
d5ac67c4cc
commit
15ec7a0df4
24 changed files with 0 additions and 0 deletions
levels/symref-create
9
levels/symref-create/description
Normal file
9
levels/symref-create/description
Normal file
|
@ -0,0 +1,9 @@
|
|||
Instead of pointing directly to objects, refs can also point to other refs!
|
||||
|
||||
When that happens, they are called "symbolic refs". You can create or update a symbolic ref using
|
||||
|
||||
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!
|
1
levels/symref-create/goal
Normal file
1
levels/symref-create/goal
Normal file
|
@ -0,0 +1 @@
|
|||
git symbolic-ref HEAD refs/best_commit
|
4
levels/symref-create/start
Normal file
4
levels/symref-create/start
Normal file
|
@ -0,0 +1,4 @@
|
|||
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
levels/symref-create/win
Normal file
1
levels/symref-create/win
Normal file
|
@ -0,0 +1 @@
|
|||
git symbolic-ref HEAD | grep _commit
|
Loading…
Add table
Add a link
Reference in a new issue