Create Branch from Detached HEAD State
Beginner Mode
Start your terminal to use beginner mode.
Scenario:
You have a Git repository at /home/interview/repo where you checked out a specific commit by its hash to inspect some old code. When you run git status, it warns that you're in detached HEAD state.
Task:
Create a new branch from your current detached HEAD state and switch to it.
Terminal requires a larger screen
Open this page on a desktop or tablet (≥ 768px) to launch the terminal and practice hands-on.
Linux Terminal Environment
Write and execute your solution in the terminal below.
Track
| Question | Difficulty | Company | Access |
|---|
Need more practice in this area? Explore more questions →
CGI