mirror of
https://github.com/git-learning-game/oh-my-git.git
synced 2024-11-03 19:04:40 +01:00
22 lines
445 B
Text
22 lines
445 B
Text
|
[description]
|
||
|
|
||
|
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>
|
||
|
|
||
|
Create a symbolic ref called "refs/rainbow"!
|
||
|
|
||
|
[setup]
|
||
|
|
||
|
[setup goal]
|
||
|
|
||
|
BLOB=$(git hash-object -w --stdin)
|
||
|
git update-ref refs/double "$BLOB"
|
||
|
git symbolic-ref refs/rainbow refs/double
|
||
|
|
||
|
[win]
|
||
|
|
||
|
git symbolic-ref refs/rainbow
|