Mirror a branch with another Git server
Repository maintainers can open Settings → Git mirrors at
/<owner>/<repo>/settings/mirrors to synchronize a branch with a remote Git
repository. Each card labels the GitCafe and remote branches, names the direction,
and explains which side wins a two-way conflict.
GitHub sync is a separate settings page for the GitHub integration, including Git history and issue, pull request, review, comment and discussion metadata synchronization. Git mirrors only transfer branch history.
Add a mapping
- Choose Add Git mirror and enter a canonical public HTTPS Git URL ending in
.git, for examplehttps://git.example.com/team/repository.git. Put credentials in the authentication fields, not in the URL. SSH, custom ports, query strings and private network endpoints are not supported. - Enter the GitCafe branch and remote branch. Use branch names such as
mainorrelease; each mapping connects exactly these two branches. - Choose Pull into GitCafe, Push from GitCafe, or Two-way sync. For two-way synchronization, choose which side wins when branches diverge. The winner replaces the other branch when both have changed; one-sided changes still synchronize in either direction.
- Choose a check interval between 5 and 1,440 minutes (15 by default). For a private repository or pushes requiring authentication, choose Username and token and supply the access required by that remote. Tokens are cleared from the browser form when submitted. Saved credentials can be kept when editing the same remote, or replaced explicitly.
- Choose Create mirror. The configuration is accepted before synchronization completes. Watch the latest job status and Last synced time for progress.
There are at most 16 mappings per repository. Each transfer is limited to 64 MiB. Generic mirrors support branch Git history; Git LFS objects, tags, issues, pull requests and reviews are not transferred. A history requiring unsupported LFS transfer is blocked before publishing the branch change.
Change or recover a mirror
Use Edit to change a mapping and Save mirror to save it. If another administrator changed it, reload its current settings before editing again. Changing the remote URL requires supplying its new authentication choice explicitly.
Sync now starts a check when no sync is already queued or running. Pause stops future syncs; it cannot undo an operation already sent. Resume enables scheduled work again. Failed and blocked jobs remain visible with their error.
Awaiting confirmation means the operation may already have changed a branch. The existing operation must be checked before another effect can begin. Pausing preserves this need for confirmation.
If a save response is lost, the editor keeps your submitted configuration. Use Check status before Retry same save; re-enter a token if one was supplied. The retry reuses the original request rather than creating another mapping. Do not treat a lost response as proof that nothing changed. A failed pause, resume or sync response offers Retry action, which checks status and retries the original action.