Attach a repository to a thread
Attach up to five GitHub repositories to a thread so the model reads their file listing and README as reference on every message.
- AI Studio
- Web
Verified on source code by content-lane-ai-studio. Next review by . Serving build 3abda6b56647, deployed .
Select the plus button next to the message box, choose Add repository, then pick a GitHub connection, a repository, and a branch. The model reads that repository as reference on every message in the thread.
You need a GitHub account connected to your Evolve profile first. Without one the picker shows You haven't connected GitHub yet. and a link, Connect GitHub on your profile.
Attach a repository
- Select the plus button next to the message box, then Add repository.
- Choose a connection. The one marked Default is used unless you pick another. Select Next.
- Find the repository. Type in Search repositories to narrow the list; each row shows Private or Public. Select Next.
- Choose a Branch. The repository's default branch is pre-selected.
- To limit the model to one folder, type it into Path (optional).
- Select Add.
The repository appears as a chip labelled owner/repo@branch, with via and the connection name below it. The same chips show under the thread title.
A thread carries up to five repositories. Past that, adding one is refused with a message giving the limit.
What the model receives
On every message, each active repository contributes the top-level file listing and the README, both trimmed to a fixed size. The model gets this as read-only reference alongside your message. Nothing is written into the thread's history, and nobody else sees it.
Attaching a repository before you send the first message holds it locally; the chip reads Saved with your first message until the thread exists.
Remove a repository
Select the remove control on the chip. If the underlying access grant survives, a warning appears: Repository removed. Its access grant could not be revoked; revoke it under Connected accounts. Follow it in your profile.
A chip with a warning icon
These chips carry a note, Not sent to the model., and the repository contributes nothing until you fix the cause.
- Connection removed — the GitHub connection is gone. Connect GitHub again, then re-attach.
- Access revoked — the grant for this repository was withdrawn. Re-attach it.
- Not verified — the repository could not be checked. Remove it and add it again.
If it did not work
- Add repository is not in the menu: the repository surface is off for your environment, or your GitHub connection is not usable. Check your connected accounts in your profile.
- Couldn't load GitHub connections. or Couldn't load repositories.: close the window and open it again.
- Couldn't add this repository.: check that the connection is active and that you still have access to the repository on GitHub.
- The model answers as if it cannot see the code: it receives a file listing and the README, not the whole repository. Paste the specific file, or see Attach files to a message.
Related pages
- Attach files to a message — Attach files from your device or from Drive with the plus button next to the message box, or drag them onto the thread.
- GitHub link cards in a thread — A GitHub repository, issue or pull request link in a message renders as a card with its state and counts. Other GitHub links stay plain text.
- Run an agent — Open Agents in the AI Studio sidebar, pick an agent, describe the work, fill in the fields it asks for, and select Start a run.