Create Branch Fill
Fill in the Blank Easy
Question
Fill in the blank to create a branch 'dev' and switch to it in one command.
Code
git checkout ___ dev
Hint
The flag to create a new branch is two characters.
Explanation
The -b flag tells git checkout to create the branch if it does not exist, then switch to it. Without -b, checkout only switches to an existing branch and fails if the branch does not exist.
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.