> ## Documentation Index
> Fetch the complete documentation index at: https://ai-development-environment.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Worktrees

> Link GitLab remotes and merge requests to AIDE worktrees.

AIDE recognizes GitLab.com remotes and remotes under the configured self-hosted instance root. A worktree chooses its provider from its canonical remote and cannot mix GitHub and GitLab request or pipeline records.

<Frame>
  <img className="block dark:hidden" src="https://mintcdn.com/ai-development-environment/XmuMCFv09SOCZYoa/images/light/gitlab-worktree-detail.png?fit=max&auto=format&n=XmuMCFv09SOCZYoa&q=85&s=4f2e5e7dcd8002dbb12d43a2121aad2f" alt="Worktree linked to a GitLab merge request in light theme" width="3840" height="2160" data-path="images/light/gitlab-worktree-detail.png" />

  <img className="hidden dark:block" src="https://mintcdn.com/ai-development-environment/aldo79nFpNgOg3HT/images/dark/gitlab-worktree-detail.png?fit=max&auto=format&n=aldo79nFpNgOg3HT&q=85&s=5ae4bdbd6649383a936bb58410b35409" alt="Worktree linked to a GitLab merge request in dark theme" width="3840" height="2160" data-path="images/dark/gitlab-worktree-detail.png" />
</Frame>

For a GitLab worktree, the detail page can:

* Discover and attach the branch's merge request
* Create a merge request for the branch
* Show merge-request metadata and pipeline badges
* Show normalized pipeline history and retry actions
* Enable auto-merge when GitLab permits it

The provider-neutral `sourceControlRequest` GraphQL field powers new clients. The legacy GitHub-only `pullRequest` field remains available so existing integrations do not break.

Project paths are used for display and links. Numeric GitLab project IDs remain the canonical linkage even after a namespace or project rename.
