docs/ai_builder/features/connect_to_git_providers.md
Besides the GitHub integration, Reflex Build can sync to any Git remote, including GitLab, Bitbucket, a self-hosted server, or an existing GitHub repository. You connect it with a repository URL and a fine-grained access token, then push and pull the same way you would with GitHub.
To connect, provide:
https://gitlab.com/your-org/your-app.git).Unlike the GitHub integration, which each user authorizes with their own account, the token is saved as one of the app's secrets (GIT_PAT_TOKEN). Anyone working on the app pushes and pulls with that stored token, so use a token whose repository access is appropriate to share with the app's collaborators.
The connection tracks two separate repositories: the internal history Reflex Build keeps for your app, and your external remote. Pushing copies your app's current files to the remote as a commit; pulling copies the remote's latest files back into the editor. The two histories stay independent, so a sync copies the files across, not the individual commits.
After connecting, the Push and Pull actions work the same as with GitHub.
To bring in an existing repository, enter its remote URL and a token with access to it, then pull its files into the editor. Reflex Build syncs against that branch from then on.
If the repository is empty, name a new branch instead of an existing one, and Reflex Build initializes it on the first push.
Git integration is available on plans that include the Git connection feature. If your plan does not include it, connecting will prompt you to upgrade.