---
name: "git-annex-pre-push"
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-pre-push"
---

# git-annex-pre-push(1)

run by git pre-push hook

## NAME

git-annex-pre-push - run by git pre-push hook

## SYNOPSIS

git annex pre-push

## DESCRIPTION

This is meant to be called from git's pre-push hook. git-annex automatically sets up the hook.

This hook prevents all pushes to git remotes when there is an unverified special remote.

The reason why is to guard against an attack, where an attacker configures a special remote to access a location that you do not expect it to access. For example, it might access a location that you do not intend to share with anyone. Once such a special remote is enabled, objects from it can reach the local repository, but are prevented from being sent to other repositories. But, a git push would send git-annex branch information, which could verify to an attacker that you do possess particular objects in the special remote. The hook avoids that information leakage.

## OPTIONS

- 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-verifyremote(1)](/git-annex-verifyremote/1.md)

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

## AUTHOR

Joey Hess \<id@joeyh.name\>
