Mirror a branch with another Git server
A Git mirror keeps one branch in sync with a branch on another Git server: pull changes into GitCafe, push them out, or both. Maintainers set mirrors up under Settings → Git mirrors.
Mirrors copy branch history only. Tags, Git LFS objects, issues and pull requests are not copied. To synchronize with GitHub, including issues and pull requests, use GitHub sync instead.
Add a mirror
- Choose Add Git mirror.
- Enter the remote's public HTTPS URL ending in
.git, for examplehttps://git.example.com/team/repository.git. SSH URLs, custom ports and private network addresses are not supported. - Enter the GitCafe branch and the remote branch, such as
main. - Choose a direction:
- Pull into GitCafe: the remote branch updates the GitCafe branch.
- Push from GitCafe: the GitCafe branch updates the remote branch.
- Two-way sync: changes flow both ways. Choose which side wins when both have changed; a change on only one side always syncs.
- Choose how often to check, from 5 to 1,440 minutes (default 5).
- If the remote needs credentials, choose Username and token and enter them. Never put credentials in the URL.
- Choose Create mirror.
The card then shows the latest sync and Last synced time. A repository can have up to 16 mirrors, and each transfer is limited to 64 MiB.
Manage a mirror
- Sync now checks for changes immediately.
- Pause stops scheduled syncs; Resume starts them again.
- Edit changes the mapping. Changing the URL requires entering its credentials again; otherwise saved credentials are kept.
Failed syncs stay visible with their error. Awaiting confirmation means a sync may already have changed a branch; GitCafe checks the outcome before running another. If a save or action reports an uncertain result, use Check status or Retry action rather than creating a new mirror.