GitHub
Automatic repository creation and code synchronization. Every App2 project gets a GitHub repository with full version control and history.
Written By Nick Gatzoulis
Last updated 4 months ago
What is GitHub integration?
GitHub integration automatically creates and manages repositories for your App2 projects. Every code change syncs to GitHub, giving you full version control, history, and the ability to clone and work locally.
What you get:
Automatic repositories: Created for every project
Code synchronization: All changes saved to GitHub
Version control: Complete git history
Local development: Clone and work on your machine
Collaboration: Standard git workflows
Backup: Your code is safe in GitHub
Two repository types:
App2-managed: Hosted in App2's GitHub organization (default, all tiers)
User-owned: Hosted in your GitHub account/organization (Pro feature)
Repository types
Choose where your code lives.
App2-managed repositories
Default for all users—repositories hosted in App2's GitHub organization.
Characteristics:
Created automatically for every project
Available to all tiers (Free, Pro, Lifetime Pro)
No GitHub connection required
Full access to clone and fork
You can export the project, but you cannot access the GitHub repository directly
Best for:
Getting started quickly
Free tier users
Learning and experiments
When you don't need your own GitHub org
User-owned repositories
Migrate your repository to your own GitHub account or organization (Pro feature).
Characteristics:
Hosted at
github.com/your-org/your-projectRequires Pro subscription ($25/month)
Your organization, your control
Connect custom domains via Vercel
Professional branding
Team collaboration in your org
Best for:
Professional projects
Client work
Company/team projects
When you need your own GitHub org
Comparison
Feature | App2-managed | User-owned |
Location | App2's GitHub org | Your GitHub account/org |
Setup | Automatic | Requires connection |
Availability | All tiers | Pro and higher |
Cost | Included | Pro subscription required |
Control | No access to the repository | Full access & ownership |
Vercel integration | ❌ | Full integration & custom domains |
Tip: Start with App2-managed repositories. Migrate to user-owned when you need professional branding or custom domains.
Prerequisites
For App2-managed repositories:
App2 account (any tier)
Nothing else—works automatically
For user-owned repositories:
GitHub account
Pro subscription ($25/month)
GitHub organization (or use personal account)
Workspace owner or admin role
Setup steps
For App2-managed repositories
No setup required.
When you create a project, App2 automatically:
Creates a GitHub repository
Syncs your code
Provides repository URL
Enables git operations
That's it—you're done!
For user-owned repositories (Pro)
Migrate your repository to your own GitHub organization.
Step 1: Connect GitHub App
Go to Workspace Settings → Integrations → GitHub
Click "Connect GitHub"
Redirected to GitHub for authorization
Select organizations to grant access
Click "Install & Authorize"
Redirected back to App2
Your GitHub account is now connected.
Step 2: Link project to your GitHub
Open your project
Go to Project Settings → General → GitHub Repository
Find "Link Your Own GitHub" section
Select your GitHub organization from dropdown
Click "Migrate repository"
Wait for migration (30-60 seconds)
Page refreshes automatically
Your repository is now at github.com/your-org/project-slug.
Using GitHub integration
Automatic code synchronization
Every code change the AI makes is automatically committed to GitHub.
What gets synced:
All file changes
New files created
Deleted files
Package.json updates
Configuration changes
Commit messages:
Auto-generated based on changes
Include file names and operation types
Timestamped for history
Sync frequency:
Immediately after AI completes code generation
Before deployments
After significant changes
Accessing your repository
View repository:
Check Quick Actions → Integrations → GitHub
Or Project Settings → General → GitHub Repository
Shows repository URL and status
Clone repository:
git clone https://github.com/org-name/project-slug.git
cd project-slug
Work locally:
Clone repository to your machine
Make changes in your favorite editor
Push changes back to GitHub
App2 syncs changes automatically
Linking your own GitHub (Pro)
Migrate from App2-managed to user-owned repository.
Requirements:
Pro subscription
GitHub App connected
Project in Ready status
Migration process:
App2 creates new repo in your organization
Copies all code and history
Updates project to use new repo
Old App2-managed repo archived (not deleted)
What stays the same:
All code and files
Git history preserved
Sandbox continues working
Chat sessions unaffected
What changes:
Repository URL (becomes → your-org/*)
Repository ownership
Can now use custom domains (Vercel)
Project freeze protection
App2 protects your projects when GitHub access is revoked or lost.
What is project freezing?
When GitHub access is lost, App2 "freezes" affected projects to prevent data loss or inconsistencies.
Frozen projects cannot:
Generate new code
Make file changes
Deploy to production
Sync to GitHub
Frozen projects can:
View existing code
Read chat history
Access project settings
See the freeze reason
When projects freeze
Projects freeze when:
GitHub App installation revoked
GitHub App installation suspended
Repository deleted from GitHub
Repository archived
Organization deleted
Organization access removed
Automatic protection:
Prevents code generation errors
Stops broken git operations
Protects data integrity
Clear messaging about issue
Unfreezing projects
Projects unfreeze automatically when:
GitHub App reinstalled
Repository unarchived
Installation reconnected
Access restored
How to unfreeze:
Check freeze reason in project banner
Reconnect GitHub App (if revoked)
Unarchive repository (if archived)
Restore organization access (if removed)
Project unfreezes immediately
Manual unfreeze: Contact support if automatic unfreeze doesn't work.
Managing organizations
Viewing connected organizations
See all GitHub organizations connected to your workspace.
Where to view:
Go to Workspace Settings → Integrations → GitHub
Lists all connected organizations
Shows installation status for each
Organization status:
Active (green): Working properly
Suspended (yellow): Needs attention
Removed (red): No longer accessible
Reconnecting GitHub
If installation is suspended or removed, reconnect it.
How to reconnect:
Go to Workspace Settings → Integrations → GitHub
Find organization with "Suspended" or "Removed" status
Click "Reconnect" or "Connect GitHub"
Authorize on GitHub again
Status updates to "Active"
Frozen projects unfreeze automatically after successful reconnection.
Removing organizations
Remove GitHub organizations you no longer need.
How to remove:
Revoke App2 GitHub App access in GitHub settings
Organization shows as "Removed" in App2
Projects using this org will freeze
Reconnect or migrate projects to another org
Best practices
Repository management
For App2-managed repos:
Keep them for learning and experiments
Free tier perfect for public projects
Easy to get started
Migrate to user-owned when you need full control and ownership
For user-owned repos:
Use for client work
Professional project organization
Team collaboration in your org
Required for custom domains
Security
Protect your repositories:
Review GitHub App permissions periodically
Monitor repository access
Use private repositories for sensitive code
Enable branch protection (in GitHub)
Require code review for important projects
Workflow tips
Local development:
# Clone repository
git clone https://github.com/your-org/project.git
# Create branch
git checkout -b feature/new-feature
# Make changes locally
# ... edit files ...
# Commit and push
git add .
git commit -m "Add new feature"
git push origin feature/new-feature
Syncing with App2:
App2 pulls latest changes automatically
Work in App2 or locally
Changes sync both ways
Use git for advanced workflows
Troubleshooting
Can't connect GitHub
Issue: GitHub connection fails or redirects don't work.
Solutions:
Check you're logged into GitHub in same browser
Allow pop-ups from App2.dev
Try connecting in incognito/private mode
Clear browser cache
Verify GitHub account has proper permissions
Project frozen after GitHub changes
Issue: "Project Frozen" banner appears, can't make changes.
Solutions:
Read freeze reason in banner
Click "Reconnect" link to go to settings
Reinstall GitHub App if revoked
Unarchive repository if archived
Restore organization access if removed
Project unfreezes automatically when access restored
Can't migrate to user-owned repository
Issue: "Migrate repository" button disabled or not showing.
Solutions:
Verify you have Pro subscription
Check GitHub App is connected
Ensure you're workspace owner/admin
Confirm project status is Ready (not Scaffolding or Building)
Select a GitHub organization from dropdown
Repository not syncing
Issue: Code changes in App2 not appearing in GitHub.
Solutions:
Check GitHub repository exists (not deleted)
Verify project isn't frozen
Check GitHub App installation is active
Wait a few minutes for sync
Restart sandbox if needed
Multiple organizations showing
Issue: Seeing organizations you didn't expect.
Solution: This is normal. GitHub App shows all organizations where you granted access during installation. You can install App2 on multiple organizations.
FAQ
Do I need to connect GitHub?
No, but it's automatic for all projects. Every project gets a GitHub repository by default—no action needed on your part.
Can Free tier users use GitHub?
Yes. Free tier gets App2-managed repositories automatically. User-owned repositories require Pro subscription.
What's the difference between App2-managed and user-owned repos?
App2-managed: Hosted internally in App2's GitHub organization, available on all tiers, automatic setup.
User-owned: Hosted at github.com/your-org/*, requires Pro, more control, needed for custom domains.
Can I switch from App2-managed to user-owned?
Yes. Go to Project Settings → GitHub Repository → Migrate repository. Requires Pro subscription. Migration copies all code and history.
What if I revoke GitHub App access?
Projects using that GitHub organization will freeze. You can't make code changes until you reinstall the GitHub App and restore access.
Can I use the same GitHub organization for multiple projects?
Yes. One GitHub organization can host repositories for multiple App2 projects. Each project gets its own repository.
Will my repository be deleted if I delete my project?
You choose during project deletion. You can keep the GitHub repository (code preserved) or delete it entirely.
Can I make my repository private?
Yes. Repository visibility matches your project visibility. Make your project private (Pro feature) and the GitHub repo becomes private too.
Can team members access the GitHub repository?
App2-managed: Public projects = public repos. Private projects = only workspace members.
User-owned: Access controlled by your GitHub organization permissions.
How do I add collaborators to my repository?
App2-managed: Invite members to your App2 workspace.
User-owned: Manage collaborators in your GitHub organization settings.
Related links
Projects - Understanding projects
Workspaces - Team collaboration
Private Projects - Public vs private
Custom Domains - Requires user-owned repo
Plans and Credits - Pro subscription