🎙 Free live masterclass · Sun, 29 Nov, 7:00 pm IST · Java Full Stack roadmap Register free →
Skills101
← Quiz: How Git Works Inside: all 10 questions

Quiz: How Git Works Inside · Question 7 of 10

.git/HEAD contains ref: refs/heads/main. What does that mean?

.git/HEAD contains ref: refs/heads/main. What does that mean?

  1. A.You are on the main branch; a new commit will move main
  2. B.You are in detached HEAD state
  3. C.main has no commits
  4. D.HEAD and main are two different commits
Answer & explanation

Correct answer: You are on the main branch; a new commit will move main

HEAD names the current branch. In detached state it would contain a commit id instead.

Can you get the rest right without peeking?

Take the timed Quiz: How Git Works Inside quiz free. Pass it to earn XP and count towards your certificate.

Start the quiz →