GitHub Integration
Connect your Natively project to GitHub to sync code, collaborate with developers, and maintain a backup of your project.Why Connect GitHub
Version Control
Full Git history outside of Natively
Collaboration
Work with other developers on your code
Code Backup
Your code is safe in your own repository
Local Development
Clone and run your project locally
Connecting GitHub
Create or Select Repo
- New Repository: Natively creates a new repo for your project
- Existing Repository: Select an existing empty repository
Automatic Syncing
Once connected, Natively automatically:- Pushes on commit - Every change is synced to GitHub
- Preserves history - All commit messages are kept
- Handles conflicts - AI changes are cleanly merged
Syncing happens automatically. You don’t need to manually push changes.
Repository Structure
Your GitHub repository contains the complete Expo project:Working Locally
Clone and run your project locally:Local Development Requirements
- Node.js 18+
- npm or yarn
- Expo CLI (
npx expo) - iOS Simulator (Mac) or Android Emulator (optional)
Collaborating with Developers
Adding Collaborators
- Go to your repository on GitHub
- Settings → Collaborators
- Add team members by username or email
Development Workflow
For teams, we recommend:Two-Way Sync
Natively supports syncing changes made outside of Natively:When you push changes to GitHub from your local machine or via PR, those changes will be synced back to your Natively project.
Handling External Changes
- Push changes to the
mainbranch on GitHub - Natively detects the changes on next project open
- Your project is updated with the external changes
- AI has context of the new code
Best Practices
Use meaningful commit messages
Use meaningful commit messages
The AI generates descriptive commit messages, but for local changes, use clear messages like “Add checkout screen” or “Fix navigation bug”
Don't commit secrets
Don't commit secrets
Never commit API keys or passwords. Use environment variables instead.
Review AI changes
Review AI changes
Check the commit history to understand what the AI changed
Branch for experiments
Branch for experiments
Create branches for experimental features to avoid breaking main
Disconnecting GitHub
If you need to disconnect:- Go to GitHub → Settings → Applications → Authorized Apps
- Find Natively and revoke access
- Or create a new repository connection in Natively
Troubleshooting
Sync Failed
Sync Failed
- Check GitHub authorization is still valid
- Verify repository exists and you have write access
- Check for branch protection rules
Conflicts
Conflicts
- Natively uses force push for AI changes
- If you have local changes, pull before making changes in Natively
Missing Files
Missing Files
- Some files like
.envare intentionally excluded - Check
.gitignorefor excluded patterns
Private vs Public Repositories
You can choose either:| Type | Best For |
|---|---|
| Private | Commercial projects, proprietary code |
| Public | Open source projects, portfolios |