---
name: "git-annex-forget"
section: "1"
platform: "linux"
package: "git-annex"
version: "10.20261026-1"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/git-annex-forget"
---

# git-annex-forget(1)

prune git-annex branch history

## NAME

git-annex-forget - prune git-annex branch history

## SYNOPSIS

git annex forget

## DESCRIPTION

Causes the git-annex branch to be rewritten, throwing away historical data about past locations of files. The resulting branch will use less space, but **git annex log** will not be able to show where files used to be located.

When this rewritten branch is merged into other clones of the repository, **git-annex** will automatically perform the same rewriting to their local **git-annex** branches. So the forgetfulness will automatically propagate out from its starting point until all repositories running git-annex have forgotten their old history. (You may need to force git to push the branch to any git repositories not running git-annex.)

## OPTIONS

- **--drop-dead**

  -

  Also prune references to repositories that have been marked as dead.

-

  - Also the [git-annex-common-options(1)](/git-annex-common-options/1.md) can be used.

  ## SEE ALSO

[git-annex(1)](/git-annex/1.md)

[git-annex-dead(1)](/git-annex-dead/1.md)

[git-annex-filter-branch(1)](/git-annex-filter-branch/1.md)

## AUTHOR

Joey Hess \<id@joeyh.name\>
