Mundhra LabsGitHub, Gently
Stop 5 of 7·7 min read·1 thing to try

Branches let you try things without breaking anything

A branch is a side line off the main timeline. You work there freely, and only join it back once it's right.

Already open pull requests? Skip to stop 6 →

In shortWork on a branch, open a pull request, get it reviewed, merge into main.

Every repo has a main timeline, called . It should always be in working shape, because it's what people download and what your website runs on. So new work goes on a branch: a copy of the timeline with its own name, like dark-mode. When it's ready, you merge it back into main.

Try it: a feature from start to finishStep 0 of 6
main dark-mode new colours toggle button Pull request #12 Approved merged site updates
BranchCommitCommitPull requestReviewMerge
Main is safe and working.Three commits so far, and the live website runs on the last one. Now you want to try a dark mode.

What a pull request actually is

A pull request (PR) is a page on GitHub that says: "here's my branch, please pull it into main." It shows exactly what changed, line by line, and gives everyone a place to comment, ask for fixes and approve. The name is ; think of it as a merge request.

Add dark mode #12

Open

wants to merge 2 commits into main from dark-mode

A pretend pull request. Tap the tabs: these three are what you'll look at on every real one.

When two changes collide

If you and someone else change the same line in different ways, Git can't guess which one wins. That's a merge conflict. It looks scary, but it's just Git asking a human to choose. The file gets markers like these:

<<<<<<< yoursstart of your version
price: ₹99 a month
=======the divider
price: ₹129 a month
>>>>>>> mainend of their version

To fix it: keep the line you want, delete the other line and all three marker lines, save, and commit. Or ask Claude: "resolve the merge conflict, keep the ₹99 price."

And a fork?

A is your own copy of someone else's repo, under your account. You use one when you can't push to the original: you change your fork, then open a pull request asking the owner to take your changes.