Challenge 1
Complete the Git command to inspect a symbolic ref.
git HEAD
Press Ctrl⌘Enter to check your answer
In a disposable repository, create at least two commits on main and a second branch pointing at the first commit. Record `git symbolic-ref HEAD`, `git rev-parse --symbolic-full-name HEAD`, `git rev-parse HEAD^{commit}`, and `git rev-parse main^{commit}`. Advance main with a new commit and repeat the observations. Then create a fresh repository with `git init -b main` and demonstrate the unborn-branch case without inventing a commit. Your evidence must show that attached HEAD names a branch, that the branch tip can move while HEAD remains attached to that branch, and that an unborn branch can exist before its first commit. Do not use detached HEAD; that belongs to the next lesson. Success requires comparing the symbolic target and resolved object ID before and after the branch advances. Treat failed commit resolution in the unborn repository as expected evidence of an unborn branch, not as a test failure.
Challenge 1
git HEAD
Press Ctrl⌘Enter to check your answer
Challenge 2
git --short HEAD
Press Ctrl⌘Enter to check your answer
Challenge 3
git HEAD refs/heads/main
Press Ctrl⌘Enter to check your answer
Challenge 4
git --symbolic-full-name HEAD
Press Ctrl⌘Enter to check your answer