Search⌘ K
AI Features

Creating a Branch

Explore using the git branch command to list all branches and create new ones in your repository. Understand how to identify the current active branch and the importance of switching branches using git checkout to manage your work effectively.

The git branch command

The git branch command is a useful, multi-purpose tool that lets us do a lot of different things. When used as is (without any other options appended), the command will print out all the branches present in the repository and point out which branch we are currently on.

git branch

Let’s use it in ...