---
title: "Git repository: deploy on every push, the while.sh docs"
url: https://while.sh/en/docs/building-blocks/git/
updated: 2026-11-09
---

# Git repository

Each project has its git repository at while. A push to main deploys production, and a push to another branch creates a preview.

> You, to your agent: Give me the project's git address, so we deploy on every push.

## When to use it

Use it to deploy on every push: main to production, every other branch to a preview.

## How it works

Each project has its git repository at while. A push to main deploys production, and a push to another branch creates a preview.

## What to know

The repository speaks git's HTTP protocol, and your while token serves as the password.

## Guides

- [See every new version before production, like a staging environment, from your AI agent](/en/guides/preview-environments/)
