[Feature Request]: Bare Git Repository .claude Config Support
Preflight Checklist
- [x] I have searched existing requests and this feature hasn't been requested yet
- [x] This is a single feature request (not multiple features)
Problem Statement
I use a git bare repo + worktree workflow for managing large enterprise
projects. My project monorepo already has a committed .claude/ setup
for team use (shared commands, project context).
The current workflow requires me to manually create .claude config in
every new worktree for personal commands (like PR creation, task
management). Since worktrees are ephemeral and created per branch,
this is impractical. There is no layer between the project-committed
.claude/ and the global ~/.claude/ for personal, project-specific config.
Proposed Solution
Claude Code should recognize a .claude/ folder placed in the bare repo
root as a valid personal config layer. Since bare repo has no working
tree, this config can never be accidentally committed — making it
naturally personal and machine-specific.
New config lookup chain:<worktree>/.claude/ ← project team config (existing)<bare-repo-root>/.claude/ ← NEW personal project config~/.claude/ ← global personal config (existing)
Commands and CLAUDE.md from all layers should be merged.
Alternative Solutions
- Symlinks: Break on git pull/checkout when project .claude/ is committed
- ~/.claude/commands/: Works but pollutes global config with
project-specific commands, no clean separation per project
- Committing personal config: Not viable, these are personal workflow
tools not meant for team sharing
Priority
High - Significant impact on productivity
Feature Category
Configuration and settings
Use Case Example
My file structure:
my-app-bare/ ← git bare repo
.claude/ ← WANT this to work for personal commands
commands/
create-pr.md ← GitHub PR with my personal standards
clickup-task.md ← ClickUp task with my formatting
main/ ← worktree (main branch)
stage/ ← worktree (stage branch)
feature/
auth/ ← worktree
jwt/ ← worktree
Each worktree already has project's committed .claude/ (team config).
I need my personal commands available in ALL worktrees automatically
without committing them or duplicating them per worktree.
Additional Context
Technical note: Bare repo root can be detected from any worktree via: git rev-parse --git-common-dir
This is the same mechanism git itself uses internally. Claude Code
could use this to walk up and find bare repo .claude/ automatically.
This workflow (bare repo + worktrees) is increasingly common among
senior developers managing large, long-lived enterprise projects with
multiple parallel feature branches.
This issue has 5 comments on GitHub. Read the full discussion on GitHub ↗