Git Workflow — Daily Reference

Branch → Commit → PR → Merge one at a time → Sync & verify

1 Start new work from latest main Setup

Always branch off a fresh main. Pull first so you start from the latest code.

git checkout main
git pull origin main
git checkout -b your-feature-name
2 Do your work, commit, and push Develop

Stage your changes, write a clear commit message, and push your feature branch to the remote.

git add .
git commit -m "Describe your change"
git push origin your-feature-name
3 First dev ready? Open a PR into main PR

The first developer to have a feature complete and ready to merge should open a Pull Request from their branch into main.

4 Merge PRs into main one at a time Merge

We merge Pull Requests into main one at a time. No stacking, no racing — sequential merges keep history clean and conflicts small.

5 After any merge — sync your branch with main Sync
When to sync: If your branch is still in active development, update from main at natural stopping points. If your branch is ready for PR/merge, update from main first — before opening or merging the PR.

Pull the latest main, then merge it into your feature branch.

git checkout main
git pull origin main

git checkout your-feature-name
git merge main
6 Resolve conflicts & run checks Verify

After merging main into your branch, resolve any conflicts, then verify everything works before pushing.

npm run verify:local
npm run dev
# (In new terminal)
npm run worker:dev
7 Push the updated branch Push

If the merge created new commits or you resolved conflicts, stage and commit those changes, then push.

git status
# If needed:
git add .
git commit -m "Merge main and resolve conflicts"

git push origin your-feature-name

Run the checks. Every time. Not just at merge.

We have had repeated issues where code gets merged to main via PR without anyone running the checks first — and then main is broken for the whole team. These commands are your safety net. Build the habit of running them often, not only when you're about to merge.

When to run these Before opening or merging a PR (mandatory — no exceptions) After merging main into your feature branch After resolving merge conflicts At natural stopping points during development Anytime you're unsure if something still works
npm run verify:local
npm run dev
# (In new terminal)
npm run worker:dev

If these checks fail on your branch, do not push. Fix it first. A broken main blocks the entire team.

main is always the source of truth. No direct commits to main. Every change goes through a PR. Before a PR is merged, the branch must be up to date with latest main, tested, reviewed, and approved.