Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.newly.app/llms.txt

Use this file to discover all available pages before exploring further.

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

1

Open GitHub Settings

Click More → look for the GitHub button in the menu
2

Authorize Newly GitHub App

Click Connect GitHub Account and install the Newly App on your GitHub account. Installing the App does not create any repository on its own — it just grants Newly permission to create or connect one later.
3

Choose Create New or Use Existing

After install, pick one of:
  • Create New — Newly creates a fresh repository under your account (public or private).
  • Use Existing — paste a GitHub HTTPS clone URL of a repo you already have access to.
4

Your code syncs automatically

Once a repo is connected, Newly pushes your project to it and keeps it in sync.

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:
1

Clone Repository

git clone https://github.com/yourusername/your-app.git
cd your-app
2

Install Dependencies

pnpm install
3

Start Expo

pnpx expo start --tunnel
4

Test on Device

Scan QR code with Expo Go app or run in simulator

Local Development Requirements

  • Node.js 18+
  • pnpm
  • Expo CLI (pnpx expo)
  • iOS Simulator (Mac) or Android Emulator (optional)

Collaborating with Developers

Adding Collaborators

  1. Go to your repository on GitHub
  2. Settings → Collaborators
  3. Add team members by username or email

Development Workflow

For teams, we recommend:
1

Newly for Design

Use Newly to prototype and build features quickly
2

GitHub for Collaboration

Developers clone the repo and make changes locally
3

Pull Requests

Review changes through GitHub PRs
4

Merge & Sync

Merged changes sync back to Newly

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

  1. Push changes to the main branch on GitHub
  2. Newly detects the changes on next project open
  3. Your project is updated with the external changes
  4. AI has context of the new code

Best Practices

The AI generates descriptive commit messages, but for local changes, use clear messages like “Add checkout screen” or “Fix navigation bug”
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.
Check the commit history to understand what the AI changed

Disconnecting GitHub

The GitHub panel exposes three separate actions so you can stop at whichever level you need.

When a repository is connected

Disconnect Repo

Unlinks this project from its GitHub repository. The Newly GitHub App stays installed on your account and the repository stays on GitHub untouched — only this project stops syncing to it. You can reconnect the same repo or link a different one immediately.

Delete Repo

Same as Disconnect Repo, plus deletes the repository from GitHub itself. Your code is still safe in Newly’s storage. The GitHub App stays installed.

When no repository is connected

Once you’ve disconnected or deleted the repo, a third option appears at the bottom of the GitHub panel:

Disconnect GitHub

Fully removes the Newly GitHub App from your GitHub account. This revokes Newly’s access token, uninstalls the App, and clears every project’s GitHub link. After this you’re back to the Connect GitHub Account state.
You can also uninstall the Newly App directly from github.com/settings/installations — Newly detects the uninstall automatically and updates the UI the next time you return to the tab.
None of these actions delete your code from Newly. Your project continues to work; it just stops syncing to GitHub until you connect a repo again.

Troubleshooting

  • 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.
  • Newly uses force push for AI changes
  • If you have local changes, pull before making changes in Newly
  • Some files like .env are intentionally excluded
  • Check .gitignore for excluded patterns

Private vs Public Repositories

You can choose either:
TypeBest For
PrivateCommercial projects, proprietary code
PublicOpen source projects, portfolios
GitHub offers free private repositories, so there’s no cost for keeping your code private.

Next Steps

Code Editor

Learn to edit code directly

Deployment

Deploy your app to stores