Get to Know Git: Lesson 9 of 14

Getting Started with Branches

Up Next

Git Branch Workflow

Autoplaying in 7 seconds!


To view all branches available:

git branch

To create a branch:

git branch <new-branch-name>

To jump into the new branch, we need to checkout that branch:

Table of Contents

    git checkout <branch-name>

    To create a new branch and checkout at the same time:

    git checkout -b <new-branch-name>

    To delete a branch:

    git branch -d <branch-name>

    Chris Sevilleja

    176 posts

    Founder of Google Developer Expert in Web Technologies. Slapping the keyboard until something good happens.