GitHub Integration
Connect your Newly 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 Newly
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
Automatic Syncing
Once connected, Newly 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 when the AI writes code. You don’t need to manually push changes or ask the AI to push.
Working Locally
Clone and run your project locally:Local Development Requirements
- Node.js 18+
- pnpm
- Expo CLI (
pnpx 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
Newly supports syncing changes made outside of Newly:When you push changes to GitHub from your local machine or via PR, those changes will be synced back to your Newly project.
Handling External Changes
- Push changes to the
mainbranch on GitHub - Newly 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. Put secrets on the backend via “Secrets” for Liquid Backend. Commiting secrets will stop the Github connection to work.
Review AI changes
Review AI changes
Check the commit history to understand what the AI changed
Disconnecting GitHub
If you need to disconnect:- Go to GitHub → Settings → Applications → Authorized Apps
- Find Newly and revoke access
Troubleshooting
Sync Failed
Sync Failed
- Check GitHub App authorization is still valid
- Verify repository exists and you have write access
- Check for branch protection rules
- Verify you have no secrets pushed and that chat_history.json is in .gitignore as it may contain pre-signed urls that Github thinks are secrets.
Conflicts
Conflicts
- Newly uses force push for AI changes
- If you have local changes, pull before making changes in Newly
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 |
Next Steps
Code Editor
Learn to edit code directly
Deployment
Deploy your app to stores