Predict Checkout Output
Predict Output Easy
Question
What does Git print when you run `git checkout -b dev`?
Code
git checkout -b dev
Hint
Git confirms the new branch was created and you switched to it.
Explanation
git checkout -b dev creates a new branch called 'dev' and switches to it in one step. Git prints 'Switched to a new branch \'dev\'' to confirm both actions. Without -b, checkout only switches to an existing branch.
Related Resources
Related Lessons
Related Cheatsheets
Look up unfamiliar terms
A beginner-friendly glossary explains jargon in plain English — variables, functions, DOM, Promise, and more.
Decode error messages
Plain-English explanations of common errors — what they mean, why they happen, and how to fix them.
Build real projects
Apply what you learned by building guided projects with starter code and solutions.