# How to Link Repositories to Warehouses


{{< customreadfile "/includes/lookout/beta-callout.md" >}}

Your warehouse holds the data. Your repositories hold the code that produces it. Linking a repository to a warehouse tells Lookout which code describes which data, so the agent can move between a number in your warehouse and the analytics calls that produced it.

## Prerequisites

- [Connect a warehouse]({{< ref "lookout/integrations/warehouses.md" >}})
- [Connect GitHub]({{< ref "lookout/integrations/github.md" >}}) and grant access to the repository you want to link

## Link a repository to a warehouse

From **Settings** > **Connections** > **Warehouses**, link each repository to the warehouse it belongs to so Lookout knows which repository describes which data.

## What the link gives you

With the link in place, the agent can move between a number in your warehouse and the code that produced it. Asked what `checkout_started` actually captures, it can find the warehouse the event lands in, look up the repository linked to it, and read the analytics calls.

It also tells Lookout which repository to re-read when a push lands, so the generated documentation in the [Context Hub]({{< ref "lookout/working-with-lookout/context-hub.md" >}}) stays current.

<br />

