Git · Senior · Question 68 of 76

What does git switch --orphan docs create?

Explanation

The first commit on an orphan branch has no parent. It's used for things like a gh-pages branch that shares no history with the code.

Further reading

Problem with a question

Git · Senior · question 68

Test yourself

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

Take this quiz