merge-worktree
SolidSquash-merge the current worktree branch into the main branch (or a specified target). Analyzes git history and source code to craft a comprehensive commit message.
Code & Development 11 stars
1 forks Updated 3 days ago MIT
Install
Quality Score: 82/100
Stars 20%
Recency 20%
Frontmatter 20%
Documentation 15%
Issue Health 10%
License 10%
Description 5%
Skill Content
# Merge Worktree
Squash-merge the current worktree branch back into the target branch with a comprehensive, structured commit message.
## Current context
- Git dir: `!git rev-parse --git-dir`
- Current branch: `!git branch --show-current`
- Recent commits: `!git log --oneline -20`
- Working tree status: `!git status --short`
## Instructions
Follow these phases exactly, in order. Do NOT skip phases.
---
### Phase 1: Validation
1. **Verify worktree**: Check if the current git directory is a worktree. The output of `git rev-parse --git-dir` must contain `/worktrees/`. If it does not, **stop immediately** and tell the user:
> "This skill must be run from inside a git worktree. Use `/worktree` to create one first."
2. **Identify current branch**: Get the worktree branch name from `git branch --show-current`.
3. **Resolve target branch**:
- If `$ARGUMENTS` is provided and non-empty, use it as the target branch.
- Otherwise, detect the default branch: check if `main` exists, else check `master`. If neither exists, stop and ask the user.
4. **Identify the original repo path**: Parse the original repo root from the git-dir path. The worktree's `.git` file points back to the main repo — use `git rev-parse --git-common-dir` to find it, then derive the original repo working directory (its parent).
5. **Clean working tree**: Run `git status --porcelain`. If there are uncommitted changes, stop and tell the user to commit or stash them first.
---
### Phase 2: Research...
Details
- Author
- HyperAITeam
- Repository
- HyperAITeam/CLITrigger
- Created
- 4 months ago
- Last Updated
- 3 days ago
- Language
- TypeScript
- License
- MIT
Similar Skills
Semantically similar based on skill content — not just same category
Code & Development Listed
merge-worktree
워크트리 브랜치를 main으로 squash-merge + conventional commit 자동 생성. codex-swarm 워크트리 자동 인식. '머지해', 'merge worktree', '워크트리 머지', '결과 수집', 'squash merge' 요청에 사용.
0 Updated today
genusarvicolabathos238 Code & Development Listed
merge-worktree
워크트리 브랜치를 main으로 squash-merge + conventional commit 자동 생성. codex-swarm 워크트리 자동 인식. '머지해', 'merge worktree', '워크트리 머지', '결과 수집', 'squash merge' 요청에 사용.
7 Updated today
tellang Code & Development Featured
merge-pr
Merge a pull request with status checks, squash merge, and branch cleanup. Handles worktree contexts.
421 Updated today
joshukraine