Skip to content

Latest commit

 

History

History
24 lines (14 loc) · 509 Bytes

git-new-branch.md

File metadata and controls

24 lines (14 loc) · 509 Bytes

Create a new branch

git checkout -b {{NEW_BRANCH}} {{OLD_BRANCH}}

Checkout command switches between branches -b flag tells it to create a new branch at the same time

  • NEW_BRANCH: New branch to be created
  • OLD_BRANCH: The existing branch

Example:

git checkout -b commands master

Demo

Git new branch

Related