> ## Documentation Index
> Fetch the complete documentation index at: https://docs.entire.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Git Hooks

> Configure the Git hooks Entire uses to capture and sync checkpoint data.

Use this page when `git commit` or `git push` is not creating, linking, or syncing checkpoint data.

Entire uses Git hooks to run during normal Git commands:

* `git commit` links captured agent work to the commit and creates an `Entire-Checkpoint` trailer.
* `git push` syncs checkpoint data after your code push.

If those behaviors do not happen, Git may not be running Entire's hooks, or the hook may not be able to find the `entire` command.

## Start Here If

* a commit did not create a checkpoint
* a commit is missing an `Entire-Checkpoint` trailer
* checkpoint data is not syncing after `git push`
* commits work from Terminal, but not from a GUI Git client
* Git says it cannot find the `entire` command
* hooks were removed, overwritten, or need to be reinstalled
* the `entire` binary moved on your machine
* setup needs to run without prompts
* the repository already has Git hooks, or uses a hook manager such as lefthook or pre-commit

> [!NOTE]
>
> Git hooks are different from [agent hooks](https://docs.entire.com/agents/setup.md).
> Agent hooks capture the AI session while you work; Git hooks connect that
> captured session to commits and pushes.

## Install Git Hooks

For a new repository, run `entire enable` to install the Git hooks Entire needs for commit and push behavior:

```bash theme={null}
entire enable
```

## Reinstall Git Hooks

If hooks were removed, overwritten, or stopped running, reinstall them with:

```bash theme={null}
entire configure --force
```

## Keep Your Existing Git Hooks

If the repository already has Git hooks, such as your own scripts or hooks from git-lfs, lefthook, or pre-commit, `entire enable` keeps them. Each one is moved to `<hook>.pre-entire` in the hooks directory, and Entire's hook runs first, then yours.

* If a hook manager reinstalls its hooks later, Entire's hooks come back on the next agent turn or `entire enable`, chained to the hook manager's version. If the hook already had a `<hook>.pre-entire` copy, the hook manager's version takes its place and runs after Entire's; the older copy is kept as `<hook>.pre-entire.<timestamp>` and no longer runs, with a warning naming the file.
* `entire disable --uninstall` removes Entire's hooks and puts yours back. Older `<hook>.pre-entire.<timestamp>` copies are left in place and listed.

## GUI Git Clients

Terminal commits can work while GUI commits fail because apps like Xcode, Tower, GitKraken, and Sourcetree may not load your shell `$PATH`.

Configure hooks with the full `entire` binary path:

```bash theme={null}
entire configure --local --absolute-git-hook-path
```

During initial setup, use the same option with `entire enable`:

```bash theme={null}
entire enable --local --absolute-git-hook-path
```

This embeds the full path to the `entire` binary directly in the Git hooks:

```sh theme={null}
# Default
entire hooks git post-commit

# With --absolute-git-hook-path
'/Users/you/go/bin/entire' hooks git post-commit
```

The setting is written to `.entire/settings.local.json` when you pass `--local`:

```json .entire/settings.local.json theme={null}
{
  "absolute_git_hook_path": true
}
```

Absolute Git hook paths are machine-specific. If you move the `entire` binary, rerun:

```bash theme={null}
entire configure --local --absolute-git-hook-path
```

## Use Non-Interactive Setup

For scripts, CI, or bootstrap flows, run setup in non-interactive mode:

```bash theme={null}
entire enable --yes
```

To select an agent without prompts:

```bash theme={null}
entire enable --yes --agent claude-code
```

## Verify Git Hooks

After changing hook setup, check the repository status and test the Git client you actually use:

```bash theme={null}
entire status --detailed
```

Then make a test commit and push. If no checkpoint appears, run [checkpoint troubleshooting](https://docs.entire.com/guides/sessions/troubleshooting.md).
