Git · Junior · Question 42 of 75

What is a "detached HEAD"?

Explanation

It happens after checking out a commit or tag. You can look around and commit, but new commits belong to no branch; create one with git switch -c to keep them.

Further reading

Problem with a question

Git · Junior · question 42

Test yourself

Take the Git · Junior quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz