A beginner-friendly guide to branches, PRs, rebase, conflict handling, and team roles for this website.
Collaboration Guide
This document explains how the UI DESIGN LAB team should collaborate on website development with GitHub. It is written for collaborators who are still getting comfortable with Git and GitHub.
Core Principles
Keep main stable and ready to build.
Create one branch for each task.
Keep each branch focused on one clear change.
Open a Pull Request before merging into main.
Avoid large simultaneous edits to the same file, especially global files like src/app/globals.css.
Suggested Responsibilities
Product and review: decide priorities, page content, and whether a PR is ready to merge.
UI and interaction: own visual details, component states, responsive behavior, and polish.
Data and backend: own Supabase, permissions, APIs, auth, and data shape.
Docs and content: own the docs hub, template notes, changelog, and tutorials.
Codex: inspect branches, explain diffs, resolve conflicts, run builds, and help with review.
What changed:
- Updated the selected community menu color
How I verified:
- npm run typecheck
- npm run build
Notes:
- CSS-only change, no business logic changed
What Rebase Means
rebase means: move your branch onto the latest main, then replay your own changes.
Before:
main: A - B - C
your branch: A - X
After:
main: A - B - C
your branch: X'
Common commands:
git switch shuyang/menu-purple
git fetch origin
git rebase origin/main
If there are conflicts, fix the files, then continue:
git add conflicted-file
git rebase --continue
If the branch was already pushed, update GitHub with:
git push --force-with-lease
Only use --force-with-lease on your own feature branch. Do not force-push shared branches or main.
Merge or Rebase
Use rebase when updating your own feature branch from the latest main.
Use GitHub merge or squash merge when the Pull Request is ready to enter main.
Do not rebase main.
Do not force-push main.
Simple rule: your own branch can be cleaned up; the main line should only move forward.
After Merge
After the PR is merged, clean up locally:
git switch main
git pull origin main
git branch -d shuyang/menu-purple
Delete the remote branch from the GitHub PR page, or with:
git push origin --delete shuyang/menu-purple
Recommended Rhythm
1. Branch from latest main
2. Finish one small change
3. Run typecheck and build
4. Push to GitHub
5. Open a PR
6. Ask a teammate or Codex to review
7. Merge into main
8. Clean up the local branch