Branching & Merging – Power of Git

Branching & Merging – Power of Git

What is a Branch?

A branch allows you to work on features independently without affecting main code.

Create Branch

git branch feature-login
git checkout feature-login

Or:

git checkout -b feature-login

Merge Branch

git checkout main
git merge feature-login

Merge Conflicts

Occurs when:

  • Same file

  • Same lines modified

Resolve manually → add → commit.

Delete Branch

git branch -d feature-login

Comments

Popular posts from this blog

Database Integration in FastAPI (SQLAlchemy CRUD)

Middleware & CORS in FastAPI

Python Data Handling