Rollback & Versions

Version control and safe rollback for your BuildGreenfield projects

Version Control

Every change to your BuildGreenfield project is automatically versioned. This gives you:

  • Complete change history: See what changed, when, and why
  • Safe rollback: Revert to any previous state
  • Change comparison: Diff view for all modifications
  • Audit trail: Track who made what changes (Team plan)

How Versioning Works

Automatic Commits

Every time you request a change, BuildGreenfield:

  1. Analyzes the requested modification
  2. Generates or modifies code
  3. Runs automated tests
  4. Creates a version commit (if tests pass)
  5. Deploys a new preview

Each version includes:

  • Complete code snapshot
  • AI-generated commit message
  • Test results
  • Timestamp
  • Author (user or AI agent)

Version Naming

Versions are labeled with:

  • Semantic versioning: e.g., v0.1.0, v0.1.1, v1.0.0
  • Timestamps: Exact creation time
  • Tags: Optional custom tags (e.g., before-refactor, production-candidate)

Viewing Versions

Version History

Access version history from your project dashboard:

  1. Click “Versions” in the sidebar
  2. Browse chronological list of changes
  3. Click any version to view details

Version Details

Each version shows:

  • Summary: AI-generated description of changes
  • Modified Files: List of files changed
  • Diff View: Side-by-side comparison
  • Test Results: Pass/fail status with logs
  • Preview URL: Link to deployed preview at this version

Rolling Back

When to Roll Back

Common scenarios:

  • A change broke functionality
  • Performance regression
  • Unwanted feature addition
  • Testing a previous state

How to Roll Back

Simple Rollback

  1. Go to Versions
  2. Find the version you want to restore
  3. Click “Rollback to this version”
  4. Confirm the action

The project instantly reverts to that state, including:

  • All code files
  • Database schema (structure, not data)
  • Environment variables
  • Configuration files

Data Considerations

⚠️ Important: Rollback affects code and schema, but not user data.

  • Code: Fully restored ✅
  • Database Schema: Rolled back ✅
  • Database Data: Preserved ⚠️
  • File Uploads: Preserved ⚠️

If the schema changed, you may need to migrate data manually.

Rollback Strategies

Safe Rollback

For production projects, use this approach:

  1. Tag Current Version: production-stable
  2. Test New Changes: On a preview deployment
  3. Deploy to Production: When confident
  4. Monitor: Watch logs and metrics
  5. Rollback if Needed: To production-stable tag

Experimental Rollback

For development/testing:

  1. Save Checkpoint: Tag current version
  2. Try Changes: Experiment freely
  3. Compare: Check performance, behavior
  4. Keep or Revert: Based on results

Branching (Team Plan)

Team plan subscribers can create branches for parallel development.

Creating a Branch

  1. Go to Versions → Branches
  2. Click “New Branch”
  3. Name it (e.g., feature/new-dashboard)
  4. Select starting point (current or specific version)

Working on Branches

Each branch has its own:

  • Code state
  • Preview deployment
  • Version history
  • Test environment

Merging Branches

When ready to merge:

  1. Go to Branches
  2. Click “Merge” on the source branch
  3. Select target branch (usually main)
  4. Review changes
  5. Confirm merge

Conflicts are automatically resolved when possible. Manual intervention required for complex conflicts.

Best Practices

Regular Tagging

Tag important versions:

production-v1.0
before-major-refactor
stable-working-state
demo-ready

Tags make it easy to find and restore critical states.

Descriptive Change Requests

When requesting changes, be specific:

Good: “Add email validation to the signup form and show error messages inline”

Bad: “Fix signup”

Better descriptions lead to better AI-generated commit messages.

Test Before Production

Always test changes on preview deployments:

  1. Request change
  2. Review generated code
  3. Test preview URL thoroughly
  4. Tag as production-candidate
  5. Deploy to production

Incremental Changes

Make small, focused changes rather than large, sweeping modifications:

  • Easier to review
  • Simpler to debug if issues arise
  • Clearer version history
  • More precise rollback

Version Retention

Versions are retained based on your plan:

PlanRetentionStorage
Free7 days500 MB
Pro30 days10 GB
Team90 days50 GB

After retention period:

  • Versions are archived
  • Preview deployments are deleted
  • Code diffs are compressed
  • Restore from archive available (Team plan)

Advanced Features

Version Comparison

Compare any two versions:

  1. Go to Versions
  2. Select two versions
  3. Click “Compare”
  4. View side-by-side diff

Export Version

Download a specific version:

  1. Open version details
  2. Click “Export”
  3. Choose format (ZIP, Git bundle)
  4. Download

Schedule Rollback

Set a rollback to trigger automatically:

  1. Deploy a risky change
  2. Set rollback timer (e.g., 1 hour)
  3. If not manually confirmed, auto-rollback executes

Perfect for low-risk production deployments.

Troubleshooting

Rollback Failed

If rollback fails:

  1. Check error message in logs
  2. Verify database schema compatibility
  3. Contact support with version IDs

Lost Version

Versions are never truly deleted (within retention period):

  1. Go to Versions → Archived
  2. Find the version
  3. Restore if on Pro/Team plan

Merge Conflict

For complex merge conflicts:

  1. Review conflicting files
  2. Use “Manual Resolution” option
  3. Edit code directly in editor
  4. Commit resolved version

Next Steps