Skip to Content
Native GitAdvancedPush Mirrors

What Are Push Mirrors?

A Push Mirror in Git is a feature that automatically synchronizes (mirrors) your Git repository to another Git repository location whenever changes are made to the source repository.

Push Mirrors are one-way synchronization mechanisms that:

  • Automatically forward all commits, branches, and tags from your source repository to one or more target repositories
  • Trigger after changes are pushed to the source repository (hence “push” mirror)
  • Maintain an exact copy of your repository at the destination

Common Use Cases

Push Mirrors provide several benefits for different workflows:

  • Backup and redundancy: Keep an up-to-date copy of your repository on another server
  • Multi-platform publishing: Maintain presence on multiple Git platforms (e.g., mirror your APIGit repository to GitHub or GitLab)
  • Deployment workflows: Trigger deployment processes when changes are pushed
  • Cross-organization sharing: Make internal repositories available to external collaborators via limited mirrors

Creating and Managing Push Mirrors

APIGit supports configuring multiple push mirrors to synchronize your repository to multiple destinations. To configure push mirrors:

  1. Navigate to your API repository
  2. Select the Settings tab
  3. Go to the Push Mirrors sub-tab
  4. View existing push mirrors or create new ones

APIGit push mirrors list

Adding a New Push Mirror

To create a new push mirror, click the Add Push Mirror button in the upper left corner. You’ll need to provide:

  • The destination repository URL
  • Authentication credentials for the destination
  • Any specific configuration options for the mirroring process

Creating a new push mirror

Once configured, APIGit will automatically keep your destination repositories in sync with your source repository. This ensures your API specifications and related files are consistently available across all your Git platforms.

Last updated on