CLAUDE_CODE_GIT_CHECK_ONLY_IN_REPOSITORY
Updated by Alex Sorokoletov
CLAUDE_CODE_GIT_CHECK_ONLY_IN_REPOSITORY is a Claude Code environment variable: When set, marks that git checks run only inside a repository, after which the count of checks skipped outside one becomes available. Added in v2.1.321 and still present in v2.1.321. It is not in the official reference.
| Status | Present in v2.1.321 |
|---|---|
| Added | Added in v2.1.321 |
| Category | Other |
| Official docs | Not listed |
How to set it
For one session, export it in the shell that starts Claude Code:
export CLAUDE_CODE_GIT_CHECK_ONLY_IN_REPOSITORY=<value>
claudeTo apply it to every session, add it to the env object of a settings file:
// ~/.claude/settings.json
{
"env": {
"CLAUDE_CODE_GIT_CHECK_ONLY_IN_REPOSITORY": "<value>"
}
}Release notes that mention it
- Claude Code Version Tracker: Undocumented Env Vars, Feature Gates & Models
- claude-code-env-vars-v2-1-321
Related variables
CLAUDE_CODE_FOUND_REPOSITORY_GITCLAUDE_CODE_DIR_SYNC_GIT: Enabled the git engine of directory sync, starting the git-based sync worker and opening the sync gate; read until v2.1.284.CLAUDE_PTY_ORPHAN_CHECK_MS: Interval in milliseconds for the PTY host orphan watchdog; defaults to 2000, and the host exits after about thirty checks with no parent and no client.GIT_CONFIG_COUNTANTHROPIC_BETAS: Comma-separated beta feature headers.ANTHROPIC_CUSTOM_HEADERS: Custom HTTP headers (newline-separated Key: Value).ANTHROPIC_FEDERATION_RULE_IDANTHROPIC_ORGANIZATION_ID
Frequently asked questions
What does CLAUDE_CODE_GIT_CHECK_ONLY_IN_REPOSITORY do?
When set, marks that git checks run only inside a repository, after which the count of checks skipped outside one becomes available.
Which Claude Code version has CLAUDE_CODE_GIT_CHECK_ONLY_IN_REPOSITORY?
Added in v2.1.321 and still present in v2.1.321.
How do I set CLAUDE_CODE_GIT_CHECK_ONLY_IN_REPOSITORY?
Export it before starting Claude Code (export CLAUDE_CODE_GIT_CHECK_ONLY_IN_REPOSITORY=value), or add it to the "env" object in ~/.claude/settings.json to apply it to every session.
All variables, searchable: Claude Code environment variables.