---
name: "git-relink"
section: "1"
platform: "linux"
package: "git-man"
version: "1:2.11.0-3+deb9u7"
release: "Debian 9 (Stretch)"
platforms: ["linux"]
url: "https://new.carta.tech/git-relink"
---

# git-relink(1)

Hardlink common objects in local repositories

## NAME

git-relink - Hardlink common objects in local repositories

## SYNOPSIS

```
git relink [--safe] <dir>... <master_dir>
```

## DESCRIPTION

This will scan 1 or more object repositories and look for objects in common with a master repository. Objects not already hardlinked to the master repository will be replaced with a hardlink to the master repository.

## OPTIONS

- \--safe

  Stops if two objects with the same hash exist but have different sizes. Default is to warn and continue.

\<dir\>

Directories containing a .git/objects/ subdirectory.

## GIT

Part of the [**git**(1)](/git/1.md) suite
