Skip to content

Best way to get Claude Code to use gtr when creating worktrees? #135

@echarrod

Description

@echarrod

Recently it seems Claude Code is creating worktrees a lot more, particularly when dispatching work to sub-agents.

These are created at .claude/worktrees in the repo which:

  • (presumably) only observe .worktreeinclude, and not .gtrconfig
  • Aren't gitignored by default

Looking for thoughts on the best way we can get Claude Code to use gtr for these, so e.g. we can have postCreate / postCd commands run, and have everything in .gtrconfig

This could be with:

  • Adding a line to AGENTS.md
  • A hook?
  • A skill?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions