KabaForge
🌍 Türkçe · English · Deutsch · Français · Русский

09 — Branches and pull requests

A branch is a safe copy of the project where you can work without disturbing main. A pull request is the request to bring that work back.

When you need a branch

For a typo in a document, committing straight to main is fine.

Creating a branch in the browser

While committing (chapter 03), choose Create a new branch for this commit and start a pull request, name the branch, and commit. Good names describe the work:

docs/vlan-notes
fix/wrong-gateway
feature/report-export

Opening a pull request

  1. Go to Pull Requests → New Pull Request.
  2. Pick the source branch (yours) and the target (main).
  3. Title = what the change does. Description = why, plus anything reviewers should check.
  4. Press Create Pull Request.

Review

Merge conflicts

If main changed the same lines you did, KabaForge asks you to resolve it. From your computer:

git switch my-branch
git fetch origin
git merge origin/main
# open the marked files, keep the correct lines
git add .
git commit
git push

Protecting main

Settings → Branches → Add rule: require pull requests and approvals before anything reaches main. Recommended as soon as more than one person works in the repository.

⬅ Previous: 08 — Commits and history📚 All chaptersNext: 10 — Working from your computer ➡