# Repositories

Source: https://cohalen.com/docs/repositories



A repository is a git source you've connected to Cohalen: your own clone on disk,
or one cloned from a remote. Every workspace branches from exactly one repository.

The sidebar lists them all at once, each one a group of its workspaces, so parallel
work across projects stays on one screen.

## Connect [#connect]

Two ways in, and you pick one per repository.

<Tabs items="[&#x22;Open&#x22;, &#x22;Clone&#x22;]">
  <Tab value="Open">
    **Open** connects a folder that's already a git repository. Pick any folder inside
    one and Cohalen connects the repo root. If the folder isn't a git repository,
    Cohalen offers to initialize one. It never runs `git init` behind your back.

    If the folder you picked sits inside a larger repository without being its root,
    Cohalen asks which one you meant. That way a stray `.git` in a parent directory
    can't hijack the connection.
  </Tab>

  <Tab value="Clone">
    **Clone** writes a full working copy from a remote into Cohalen's own data
    directory and connects it.
  </Tab>
</Tabs>

The connected list is a set. Connect one that's already connected and Cohalen
reopens the existing entry rather than adding a second. A workspace's own folder is
a worktree, not a repository, so **Open** turns it down. Connect the repository it
came from instead.

## The sidebar [#the-sidebar]

Each repository group shows its active workspaces, with an expandable **History**
of archived ones underneath. Open one and it moves to the front of the list, so the
projects you touch most stay near the top.

## When a folder moves [#when-a-folder-moves]

A repository whose folder no longer resolves on disk shows as **Missing**. Nothing
disappears quietly.

**Relocate** points the same record at the folder's new home, keeping its
workspaces and its place in the list. Renaming a folder is a relocate. If the
source is gone for good, **Forget** removes it.

## Forget [#forget]

**Forget** drops a repository from the connected list. Cohalen reclaims only its
own scratch: the worktrees under its managed directory, and the branches it created
for them.

Your working copy and your own branches are untouched, so you can reconnect later.
