Skip to main content

Overview

Git mirroring keeps a cached copy of your repository on Whim’s infrastructure. When a task starts, the container clones from this local mirror instead of fetching directly from GitHub, which significantly reduces container startup time — especially for large repositories.

Why mirroring matters

Every Whim task runs in a fresh container that needs a copy of your repository. Without mirroring, each container clones directly from GitHub, which means:
  • Slower startup — large repos take longer to clone over the public internet
  • Rate limit pressure — many parallel tasks multiply GitHub API usage
  • Variable latency — clone speed depends on network conditions between the container and GitHub
Mirroring solves these problems by keeping a local copy that containers can clone from with minimal latency.

How it works

1

Repository connected

When you connect a GitHub repository to a workspace, Whim creates a mirror — a bare clone of the repo stored on Whim’s infrastructure.
2

Mirror stays in sync

Each time code is pushed to your repository, a GitHub webhook triggers a mirror sync. The mirror fetches the latest changes so it stays up to date with your remote.
3

Tasks clone from the mirror

When a task launches, its container clones from the mirror instead of GitHub. This is faster because the data travels over a local network rather than the public internet.
4

Fallback to GitHub

If the mirror is unavailable for any reason, containers fall back to cloning directly from GitHub. Task execution is never blocked by mirror issues.

Mirror sync triggers

The mirror is updated automatically in two scenarios:
TriggerWhen it happens
Workspace creationInitial mirror is created when the workspace connects to a repo
Code pushMirror syncs whenever commits are pushed to any branch in the repository
You don’t need to manually sync or manage the mirror — it stays current automatically.

Troubleshooting

Task startup seems slow

If tasks are taking longer than expected to start, the mirror may be out of sync or temporarily unavailable. The container will fall back to cloning from GitHub directly, which is slower but still works. Mirror issues typically resolve automatically on the next push event.

Recent commits not appearing in a task

The mirror syncs on push events. If you pushed code very recently and immediately launched a task, there may be a brief delay before the mirror reflects the latest commits. Wait a few seconds and try again, or the task container will fall back to GitHub and pick up the latest code.

Mirror not updating after push

Verify that the Whim GitHub App is installed on your repository with webhook permissions. The mirror relies on push event webhooks to trigger syncs. Check your repository’s webhook delivery logs in GitHub Settings > Webhooks to confirm events are being sent.

Branch Isolation

How every task gets its own isolated Git branch.

GitHub Integration

Setting up the Whim GitHub App and webhook permissions.