Diagnose and bypass `gh pr merge --squash --delete-branch` failing with
"failed to run git: fatal: 'main' is already used by worktree at .…
“전자상거래와 영업” 분야의 스킬이에요. Claude Code, Codex, OpenCode 외 32개 에이전트용 명령이 준비돼 있어요.
전체 설명
Diagnose and bypass `gh pr merge --squash --delete-branch` failing with
"failed to run git: fatal: 'main' is already used by worktree at ..." when
another git worktree has main checked out. Use when: (1) you run gh pr merge
and see this exact error, (2) you have multiple worktrees in the repo (e.g.
`.claude/worktrees/*`), (3) the error appears even though the GitHub merge
itself looks fine. The merge SUCCEEDED on GitHub — only gh's local-side
effect (post-merge `git checkout main`) failed. Verify via
`gh pr view N --json state,mergedAt`; if state=MERGED, you're done. This
also applies to `gh pr checkout` and any other `gh` subcommand that tries
to touch the local main branch while another worktree has it claimed.
v1.2.0 (2026-05-26) adds the sequential-error variant: if you re-run from
the main-repo worktree after the first error, you can then hit "cannot
delete branch <feature-branch> used by worktree at <feature-worktree>" —
same one-checkout-per-branch invariant, this time applied to the feature
branch. Cleanup order: `git worktree remove` BEFORE `git branch -D`.
v1.3.0 (2026-05-27) adds the `--auto --delete-branch` enable-time
variant: when checks are still pending, `gh pr merge N --auto --squash
--delete-branch` fails locally (same "main is already used by worktree"
message) BEFORE the auto-merge intent is registered server-side —
`gh pr view N --json autoMergeRequest` returns null. Workaround: drop
`--delete-branch` (`gh pr merge N --auto --squash`), then `git worktree
remove` + `git branch -D` manually after the merge lands. The post-merge
variant in v1.0-1.2 succeeds the merge first then chokes on cleanup;
this v1.3 variant chokes BEFORE the server-side enable, so verifying
with `--json autoMergeRequest` (not just `state`) is required.
Skill
전자상거래와 영업
에이전트 35개
5 스타
MIT
이 항목의 출처는 GitSkills 오픈 데이터셋(CC-BY-4.0)이에요. ANG은 이 스킬을 실행하거나 감사하지 않았어요. 설치하기 전에 소스를 확인하세요.
GitLab DuoGitLab Duo에서 SKILL.md 지원이 문서화돼 있지 않아요.소스
지원 여부는 SKILL.md와 MCP에 대한 각 에이전트의 공식 문서를 따라요. ANG가 모든 에이전트에서 이 항목을 실행해 본 것은 아니에요.
쉬운 말로
기술 지식이 필요 없어요.
이게 뭐예요?
스킬은 에이전트(Claude Code, Codex 등)에 불러오는 지시 묶음이에요. 휴대폰에 앱을 설치하는 것과 같아서, 한 번 설치하면 에이전트가 그 일을 하는 법을 알게 돼요.
어디에 쓰나요?
“전자상거래와 영업” 작업에 쓰여요. 게시자 설명: Diagnose and bypass `gh pr merge --squash --delete-branch` failing with "failed to run git: fatal: 'main' is already used by worktree at ..." when another gi…
요청 예시
“스토어의 상품 설명을 업데이트해 줘.”
에이전트
Claude Code, Codex, OpenCode 외 32개 에이전트용 명령이 준비되어 있어요.
믿어도 될까요?
GitHub 스타 5개 · MIT. 설치 전에 소스를 확인하세요.
사용량
최근 30일, 사이트와 에이전트에서의 기록이에요.
0개 선반에 담김
0회 조회
0회 명령 복사
0회 사이트에서 다운로드
0회 앱에서 설치
0회 에이전트가 직접 설치
0명의 활성 사용자
실사용 점수에는 ANG 앱에서 사용자 20명과 작업 50건 이상이 필요해요. 지금은 사용자 0명, 작업 0건이에요. 그때까지 파워 점수는 등록 정보로 추정해요.