Git worktree support for bare repos #44
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Git worktree support for bare repos
When pi-loop is executed from a bare git clone, automatically create a git worktree,
cdinto it, and run the pipeline normally. Enables CI/CD and server environments where only a bare repo exists.Design decisions
<repo>.git.pi-loop/runs/inside the worktree.pi-loop/worktrees/<issue-key>; fallback: scan parent dirfeature/prefix with provider-specific keysgit pushworks normallyBranch naming convention
feature/issue-123/title-of-issueissue-123-title-of-issuefeature/issue-123/title-of-issueissue-123-title-of-issuefeature/issue-123/title-of-issueissue-123-title-of-issuefeature/PROJ-123/title-of-jira-ticketPROJ-123-title-of-jira-ticketImplementation plan
See
IMPLEMENTATION_PLAN.md§M9 (milestones 9.0–9.5).9.0 — New branch naming convention (global)
buildBranchName()to accept provider and issue numberfeature/issue-<number>/<slug>orfeature/<KEY>/<slug>buildBranchFolderName()for worktree-safe names9.1 — Worktree detection and creation module
src/shared/git/services/gitWorktree.tsisBareRepository(),createWorktree(),ensureWorktree().pi-loop/worktrees/<issue-key>9.2 — CLI integration
9.3 — Resume with worktrees
9.4 — Pipeline adjustments
9.5 — Integration testing and documentation
docs/design-worktree.mdpi-loop opened a Draft pull request for this issue: #150