github / github/app

Support configurable worktree paths per project

未关闭
#1,435 3 条评论 2 个 reaction 已指派 0 人 在 GitHub 查看
Requests and ideas
主要语言
没有语言数据
星标
2.1k
派生
153
PR 合并指标
30 天内没有已合并 PR

描述

### Feature summary

Allow custom worktree location and naming per project

### What problem are you trying to solve?

Today, worktrees are created in a fixed structure like:

```text
repo_clone_path/
└── copilot-worktrees/
└── repo_clone_name/
└── random-worktree-name
```
For some projects, especially large C++ codebases, this can create very long filesystem paths. Those long paths can cause build or compilation issues or make the worktree harder to use in environments with strict path-length limits.

### Proposed solution

Allow users to customize the worktree location and naming structure on a per-project basis.

Possible improvements:

- Let users set a custom base worktree directory
- Let users customize the worktree folder structure
- Prefer shorter or more predictable generated worktree names
- Optionally support random-name generation patterns that keep paths compact

### Workflow impact

This would improve reliability for projects that are sensitive to path length, especially C++ and other build-heavy repositories. It would also make worktrees easier to manage for users who need a more compact or organization-specific directory layout.

### Installation context

Project-level worktree setup in the GitHub App

### Additional context

Current structure:
```text
repo_clone_path/
└── copilot-worktrees/
└── repo_clone_name/
└── random-worktree-name
```
A customizable structure would help avoid long path issues and make worktrees more accessible in constrained environments.

贡献指南

打开贡献指南

调研方向

未指定任何文件、测试或实现入口。首先定位 GitHub App 的项目级 worktree 设置,并追踪它如何生成当前的 repo_clone_path/copilot-worktrees/repo_clone_name/random-worktree-name 结构。在实现之前,明确需要哪些自定义选项和命名规则;完成应包括按项目配置,以可靠地产生更短且可预测的 worktree 路径。

由索引模型根据 Issue 内容生成。

评估

技术栈
git, github
领域
desktop, developer-experience, tooling
Issue 类型
功能
难度
5/5
预计耗时
一周以上
活跃度
冷清
描述清晰度
需要澄清
新手友好度
38/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。