Skip to content

Instantly share code, notes, and snippets.

View DavidReinberger's full-sized avatar

David Reinberger DavidReinberger

  • Shipmonk
  • Prague, Czech Republic
  • 04:09 (UTC +02:00)
  • X @DaveThe0nly
View GitHub Profile
@ben-vargas
ben-vargas / AGENTS.md
Last active June 18, 2026 16:18
Bare Git Worktrees AGENTS.md

Git Bare Repository Worktree Workflow for Claude Code

🚨 CRITICAL: Understanding My Project Structure

I use a bare Git repository approach with Git worktrees extensively. Every subdirectory in my projects represents a different git branch as a worktree.

When you see a project like /home/code/projects/my-app/:

  • my-app/ = project container (NOT a working tree)
  • my-app/.bare/ = actual Git repository database
  • my-app/.git = pointer file directing Git commands to .bare/