Labs ICT
⭐ Pro Login

Create Branch

Branches are Git's way of creating parallel universes of your project. You can have multiple branches at once and switch between them instantly. Think of it like having a main storyline with different side questsβ€”you can explore each without disturbing the main plot.

Working with Branches

Start by listing all branches with `git branch`. Use `git branch new-branch` to create, then `git checkout new-branch` to switch. You can also combine them with `git checkout -b new-branch` to create and switch in one step. Each branch has its own set of commits that are independent.

$ git branch
$ git branch feature-login
$ git checkout feature-login
$ git checkout -b hotfix
$ git branch
Try it Yourself β†’

πŸ§ͺ Quick Quiz

What command is used to create a new branch?