Skip to main content

Push Event Backups

Push event backups let you automatically create a backup every time code is pushed to a repository. This ensures your latest changes are always protected.

How It Works

When push event backups are enabled for a repository, GitSec listens for push webhooks from your Git provider. Each time a push is detected, a backup is automatically triggered with your configured scope settings.

Enabling Push Event Backups

  1. Navigate to Repositories > GitHub in the sidebar.
  2. Click on the repository you want to configure.
  3. Go to the Push Event tab.
  4. Toggle the Enable switch to turn on push event backups.
  5. Under Included Items, select which scopes to include:
    • Code & Commits
    • Pull Requests
    • Issues
tip

Push event backups are ideal for critical repositories where you need continuous protection. For less active repositories, a recurring scheduler may be more efficient.

Disabling Push Event Backups

To stop automatic backups on push:

  1. Open the repository detail page.
  2. Go to the Push Event tab.
  3. Toggle the switch off.

Existing backups created by push events will not be affected.

Push Events vs. Scheduled Backups

FeaturePush EventScheduled
TriggerEvery git pushAt a configured interval (minutely to monthly, or CRON)
Best forActive repositories with frequent commitsRepositories with periodic changes
FrequencyAs often as pushes occurBased on configured interval (minutes to months)
ConfigurationPer-repository togglePer-repository scheduler form

Both methods can be used simultaneously on the same repository.