Git Branches: The Fastest Way to Work Without Fear

Suman SharmaSuman Sharma

Git Branches: The Fastest Way to Work Without Fear

A branch is basically a pointer to a commit.

That’s why branches are “cheap”:

  • Creating a branch doesn’t copy your project files.
  • Git just creates another pointer like “I’m pointing to commit X”.
Branching concept in Git

Everyday commands

git switch -c feature/auth
git branch git branch -vv
git switch main

Naming tip

Use short, boring names: feature/login, fix/nav-overflow, chore/bump-deps.

Next

Once you have branches, you’ll need to combine them:

Contact

Get in Touch

Want to call me? book a call and I'll respond in the available time slot. I will ignore all soliciting.