> Canonical HTML: [https://docs.schematic.tech/pup/commands/repos/](https://docs.schematic.tech/pup/commands/repos/)

# Repository commands

Linking connects your local Git checkout to Schematic so Pup can check your supertests against
a specific version of your code.

## `pup link`

Sync the source from your current commit to Schematic. Your repository needs at least one
commit; a Git remote isn't required.

Linking leaves your files and Git state unchanged. See [Source and commits](/pup/help/source/)
for which files Pup includes and how to exclude files.

**Usage**

```console
pup link [path]
```

`path` defaults to your current directory. A path to a subdirectory still links the whole
repository.

**Bash**

```console
$ pup link .
  ✓ Linked text-tools · main · 8e44bea
  Next: pup check
```

With a saved login, Pup automatically syncs commits as you create or check them out. Run
[`pup check`](/pup/commands/checks/#pup-check) to check your supertests.

Each clone or Git worktree needs its own link. Switching branches or checking out another
commit doesn't require relinking.

## `pup unlink`

Stop automatic syncing for the repository containing `path`, or your current directory if you
omit the path.

**Usage**

```console
pup unlink [path]
```

**Bash**

```console
$ pup unlink .
  ✓ Unlinked · text-tools
```

Unlinking doesn't delete synced source or check history, or cancel checks already running.
