Git · Senior · Question 68 of 76
What does git switch --orphan docs create?
- ✓Correct answer: A new branch with no history and an empty index
- 2A branch that can never be merged into
main - 3A branch linked to a different remote repository
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.