Cheatsheet Pages / Git Cheatsheet

How to create and switch to a new branch in Git — checkout -b / switch -c

You are starting a new feature and want it isolated on its own branch.

git checkout -b feature/login   # classic
git switch -c feature/login     # modern equivalent

Good to know

One command to branch off and start working; switch -c is the modern spelling.

Git Cheatsheet one-page card — 30 daily and rescue commands
The full one-page card — Git Cheatsheet. Get the complete cheatsheet on GitHub