> For the complete documentation index, see [llms.txt](https://help.swarmia.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.swarmia.com/settings/integrations/code-hosting-platforms/github/excluding-repositories.md).

# Excluding repositories from sync

Choose which GitHub repositories Swarmia syncs without changing the Swarmia GitHub app's repository access.

Swarmia syncs every repository the Swarmia GitHub app can access, except forks and archived repositories. To keep a repository out of Swarmia without changing the app's access in GitHub, exclude it from sync. For example, you can exclude a copy of another repository that GitHub doesn't mark as a fork, or a sandbox repository.

You need the [organization admin](https://help.swarmia.com/settings/organization/managing-users-and-roles.md) role to exclude repositories.

## Choose repositories when you connect

When you connect a GitHub organization from [code hosting settings](https://app.swarmia.com/settings/version-control), you choose its repositories before anything syncs.

1. After you install the Swarmia GitHub app, click **Connect** next to the GitHub organization in Swarmia.
2. Untick the repositories you don't want to sync.
3. Click **Connect**.

Unticked repositories never sync to Swarmia.

If Swarmia can't load the repositories from GitHub, click **Connect all repositories** and exclude repositories later in the installation settings.

If you reconnect a GitHub organization that was connected to Swarmia before, the repositories you excluded earlier start unticked.

## Exclude repositories from a connected organization

1. Open [code hosting settings](https://app.swarmia.com/settings/version-control) and select the GitHub organization.
2. In **Synced repositories**, click **Edit**.
3. Untick the repositories you want to exclude.
4. Click **Save** and confirm.

{% hint style="warning" %}
Excluding a repository deletes its pull requests, commits, issues, and agent sessions from Swarmia.
{% endhint %}

Excluded repositories are listed at the top of the **Synced repositories** card.

## Add a repository back

In **Synced repositories**, click **Edit**, tick the repository, and click **Save**. Swarmia syncs the repository again from scratch, the same way as a newly added repository.

## Excluding a repository vs. removing the app's access

Excluding a repository stops Swarmia from syncing it, but the Swarmia GitHub app can still access it. If you need to make sure Swarmia can't read a repository at all, [remove it from the app's repository access in GitHub ↗](https://docs.github.com/en/apps/using-github-apps/reviewing-and-modifying-installed-github-apps#modifying-repository-access) instead. Either way, Swarmia deletes the repository's data.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://help.swarmia.com/settings/integrations/code-hosting-platforms/github/excluding-repositories.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
