This document describes the Git Flow branching model used in Vibe Coder 3D. Following this workflow ensures clean history, stable releases, and efficient collaboration.
- Overview
- Branch Types
- Initial Setup
- Feature Development
- Creating a Pull Request
- Release Process
- Hotfix Process
- Best Practices
- Common Scenarios
We use a modified Git Flow model with the following principles:
master: Production-ready code, tagged with version numbersdevelop: Integration branch for features (currently usingmasteras the main development branch)- Feature branches: Individual features or bug fixes
- Release branches: Preparation for new production releases
- Hotfix branches: Critical fixes for production issues
- Purpose: Production-ready code
- Protected: Yes (requires PR approval)
- Lifetime: Permanent
- Naming:
master - Tags: Version tags (e.g.,
v1.0.0,v1.1.0)
- Purpose: Integration branch for completed features
- Protected: Yes (requires PR approval)
- Lifetime: Permanent
- Naming:
develop - Status: Currently using
masterfor both development and production
- Purpose: New features or enhancements
- Branch from:
master(ordevelopwhen implemented) - Merge into:
master(ordevelopwhen implemented) - Naming:
feature/descriptive-name - Lifetime: Deleted after merge
- Examples:
feature/particle-systemfeature/asset-pipelinefeature/scripting-api
- Purpose: Non-critical bug fixes
- Branch from:
master - Merge into:
master - Naming:
fix/descriptive-name - Lifetime: Deleted after merge
- Examples:
fix/physics-collision-bugfix/material-loading-errorfix/camera-rotation-issue
- Purpose: Critical production bugs requiring immediate fix
- Branch from:
master - Merge into:
master(anddevelopif it exists) - Naming:
hotfix/version-description - Lifetime: Deleted after merge
- Examples:
hotfix/1.2.1-crash-on-startuphotfix/1.2.1-security-vulnerability
- Purpose: Prepare for production release (QA, documentation, version bumps)
- Branch from:
masterordevelop - Merge into:
master(and back todevelopif exists) - Naming:
release/version - Lifetime: Deleted after merge
- Examples:
release/1.3.0release/2.0.0
- Purpose: Documentation updates
- Branch from:
master - Merge into:
master - Naming:
docs/descriptive-name - Lifetime: Deleted after merge
- Examples:
docs/update-scripting-guidedocs/add-physics-tutorial
- Purpose: Code refactoring without changing functionality
- Branch from:
master - Merge into:
master - Naming:
refactor/descriptive-name - Lifetime: Deleted after merge
- Examples:
refactor/ecs-component-systemrefactor/renderer-architecture
Visit https://github.com/jonit-dev/vibe-coder-3d and click "Fork".
git clone https://github.com/YOUR-USERNAME/vibe-coder-3d.git
cd vibe-coder-3d# Add upstream remote
git remote add upstream https://github.com/jonit-dev/vibe-coder-3d.git
# Verify remotes
git remote -v
# origin https://github.com/YOUR-USERNAME/vibe-coder-3d.git (fetch)
# origin https://github.com/YOUR-USERNAME/vibe-coder-3d.git (push)
# upstream https://github.com/jonit-dev/vibe-coder-3d.git (fetch)
# upstream https://github.com/jonit-dev/vibe-coder-3d.git (push)yarn installyarn prepare # Installs Husky git hooksAlways start with the latest code:
# Fetch latest changes from upstream
git fetch upstream
# Ensure you're on master
git checkout master
# Merge upstream changes
git merge upstream/master
# Push to your fork
git push origin masterUse descriptive branch names following the convention:
# Feature
git checkout -b feature/add-particle-system
# Bug fix
git checkout -b fix/physics-collision-bug
# Documentation
git checkout -b docs/update-api-reference
# Refactoring
git checkout -b refactor/improve-ecs-performanceMake your changes following the Coding Guidelines.
# Make changes to files
# ...
# Check status
git status
# Add files
git add .
# Or add specific files
git add src/core/components/ParticleSystem.tsUse Conventional Commits format:
git commit -m "feat(particles): add particle system component
- Implement particle emitter with configurable parameters
- Add particle physics integration
- Include shader support for particle rendering
Closes #123"Commit Types:
feat: New featurefix: Bug fixdocs: Documentation only changesstyle: Code style changes (formatting, semicolons, etc.)refactor: Code change that neither fixes a bug nor adds a featureperf: Performance improvementtest: Adding or updating testschore: Build process, dependencies, or auxiliary toolsci: CI/CD configuration changes
Commit Best Practices:
- Keep commits atomic (one logical change per commit)
- Write clear, descriptive commit messages
- Reference related issues using keywords:
Fixes #123,Closes #456,Relates to #789 - Keep subject line under 72 characters
- Use imperative mood ("add feature" not "added feature")
Regularly sync with upstream to avoid conflicts:
# Fetch upstream changes
git fetch upstream
# Rebase your branch on latest master
git rebase upstream/master
# If conflicts occur, resolve them then:
git add .
git rebase --continue
# Force push to your fork (only on your feature branch!)
git push origin feature/your-feature-name --forceBefore pushing, ensure all tests pass:
# Run all verification checks
yarn verify
# Individual checks
yarn test # Unit tests
yarn typecheck # TypeScript type checking
yarn lint # Linting
yarn rust:test # Rust tests (if applicable)git push origin feature/your-feature-nameGo to your fork: https://github.com/YOUR-USERNAME/vibe-coder-3d
- Click "Compare & pull request" button
- Select base repository:
jonit-dev/vibe-coder-3d - Select base branch:
master - Select compare branch:
feature/your-feature-name
Complete all sections of the PR template:
- Description: Clear summary of changes
- Related Issues: Link issues (e.g.,
Fixes #123) - Type of Change: Select applicable options
- Components: Mark affected components
- Changes Made: Detailed list of changes
- Testing Performed: Describe testing done
- Screenshots/Videos: Add visual proof for UI changes
- Performance Impact: Note any performance considerations
- Breaking Changes: Document breaking changes and migration path
- Documentation: Confirm docs are updated
- Checklist: Complete all items
Click "Create pull request".
When reviewers request changes:
- Make the requested changes in your local branch
- Commit the changes:
git add . git commit -m "fix: address review feedback"
- Push to your fork:
git push origin feature/your-feature-name
- The PR will automatically update
Responding to comments:
- Reply to each comment explaining your changes
- Mark conversations as resolved when addressed
- Ask for clarification if needed
Once approved:
- Maintainers will squash and merge your PR
- Your feature branch will be automatically deleted from the repository
- Delete your local branch:
git checkout master git pull upstream master git branch -d feature/your-feature-name git push origin --delete feature/your-feature-name
# Ensure you're on latest master
git checkout master
git pull upstream master
# Create release branch
git checkout -b release/1.3.0-
Update version numbers:
# Update package.json version npm version 1.3.0 --no-git-tag-version # Update Cargo.toml versions # Edit rust/engine/Cargo.toml # Edit rust/game/Cargo.toml
-
Update CHANGELOG.md:
## [1.3.0] - 2025-11-09 ### Added - New particle system component - Enhanced material editor ### Fixed - Physics collision detection bug - Camera rotation issue ### Changed - Improved ECS performance - Updated renderer architecture
-
Update documentation:
- README.md (if needed)
- API documentation
- Migration guides (for breaking changes)
-
Run full test suite:
yarn verify yarn rust:test
git add .
git commit -m "chore(release): prepare version 1.3.0"
git push origin release/1.3.0- Open PR from
release/1.3.0tomaster - Title: "Release v1.3.0"
- Description: Copy CHANGELOG.md entries for this version
- Request reviews
Once approved:
# Merge to master
git checkout master
git pull upstream master
# Create annotated tag
git tag -a v1.3.0 -m "Release version 1.3.0
Added:
- Particle system component
- Enhanced material editor
Fixed:
- Physics collision detection
- Camera rotation issue"
# Push tag
git push upstream v1.3.0
# Delete release branch
git branch -d release/1.3.0
git push origin --delete release/1.3.0- Go to https://github.com/jonit-dev/vibe-coder-3d/releases/new
- Select tag:
v1.3.0 - Title:
v1.3.0 - Release Title - Description: Paste CHANGELOG.md content
- Attach binaries if applicable
- Click "Publish release"
For critical bugs in production that need immediate attention:
# Ensure you're on latest master
git checkout master
git pull upstream master
# Create hotfix branch from master
git checkout -b hotfix/1.2.1-crash-on-startup# Make the fix
# ...
# Commit with clear description
git add .
git commit -m "fix(core): prevent crash on startup when config is missing
- Add null check for config object
- Provide sensible defaults for missing values
- Add error logging for debugging
Fixes #456"yarn verify
yarn rust:test
# Manual testing of the specific bug
# ...# Update package.json
npm version patch --no-git-tag-version # 1.2.0 -> 1.2.1
# Update CHANGELOG.md## [1.2.1] - 2025-11-09
### Fixed
- Critical crash on startup when configuration file is missinggit add .
git commit -m "chore(release): version 1.2.1"git push origin hotfix/1.2.1-crash-on-startup- Open PR from
hotfix/1.2.1-crash-on-startuptomaster - Mark as urgent
- Request immediate review
# After approval, merge to master
git checkout master
git pull upstream master
# Tag the hotfix
git tag -a v1.2.1 -m "Hotfix v1.2.1: Fix crash on startup"
git push upstream v1.2.1
# If develop branch exists, merge back
# git checkout develop
# git merge master
# git push upstream develop
# Delete hotfix branch
git branch -d hotfix/1.2.1-crash-on-startup
git push origin --delete hotfix/1.2.1-crash-on-startup- Keep branches short-lived: Merge within 1-2 weeks
- One feature per branch: Don't mix multiple features
- Delete merged branches: Clean up after merging
- Sync regularly: Rebase on master frequently to avoid conflicts
- Atomic commits: Each commit should be a logical unit
- Descriptive messages: Explain why, not just what
- Reference issues: Use
Fixes #123to auto-close issues - Sign commits: Consider signing commits for security
- Review your own PR first: Self-review before requesting others
- Keep PRs small: Easier to review, faster to merge
- Respond promptly: Address feedback within 24-48 hours
- Be respectful: Constructive feedback only
- Test before pushing: Run
yarn verifylocally - Test both platforms: TypeScript editor and Rust engine
- Write tests for new features: Maintain test coverage
- Manual testing: Not everything can be unit tested
- Update docs with code: Documentation is part of the feature
- Add examples: Show how to use new features
- Document breaking changes: Include migration guides
- Keep CLAUDE.md updated: Document learnings and patterns
# During rebase, conflicts occur
git status # See conflicting files
# Edit files to resolve conflicts
# Look for <<<<<<< HEAD markers
# After resolving
git add .
git rebase --continue
# If you want to abort
git rebase --abort# You're on master but should be on feature branch
git branch feature/new-feature # Create branch at current position
git reset --hard upstream/master # Reset master to upstream
git checkout feature/new-feature # Switch to feature branchgit checkout feature/your-feature
git fetch upstream
git rebase upstream/master
# Resolve conflicts if any
git push origin feature/your-feature --force# Contact maintainers immediately
# Do not force push to master
# They will help revert the changes# Create multiple feature branches from your current work
git checkout -b feature/part-1
# Cherry-pick specific commits
git cherry-pick <commit-hash>
git checkout -b feature/part-2
git cherry-pick <other-commit-hash>
# Create separate PRs for each part# You have uncommitted changes on master
git stash # Stash changes
git checkout -b feature/new-feature # Create feature branch
git stash pop # Apply stashed changes
git add .
git commit -m "feat: add feature"- Git Flow Questions: Check Atlassian Git Flow Guide
- Git Basics: See Git Documentation
- Project-Specific: Check CONTRIBUTING.md
- Need Help: Ask in GitHub Discussions
Remember: When in doubt, create a PR and ask for guidance. The community is here to help!