npx claudepluginhub tqer39/claude-code-marketplace --plugin git# Push 現在のブランチをリモートへ push する。conflict がある場合は rebase で解消し、auto-merge ワークフローが存在する場合は `claude-auto` ラベルを PR に付与する。 ## 手順 ### 1. ブランチの確認 - `git branch --show-current` で現在のブランチ名を取得する - ブランチが `main` または `master` の場合は **エラーを表示して終了** する ### 2. 未コミット変更の確認 - `git status --porcelain` で未コミットの変更を確認する - 変更がある場合は **警告を表示して終了** する(先にコミットするよう案内) ### 3. リモートの最新化 ### 4. Base Branch の検出 以下の優先順で base branch を決定する: 1. `main` がリモートに存在するか: `git ls-remote --heads origin main` 2. `master` がリモートに存在するか: `git ls-remote --heads origin master` 3. リモート HEAD: `git symbolic-ref refs/remotes/origin/HEAD 2>/dev/nu...
/pushOrchestrates production-ready git push: justifies untracked files, runs /review quality gate, pushes if clean, updates PR, runs /testserver, verifies readiness.
/pushVerifies code quality via /verify-clean, warns on main/master pushes if other branches exist, pushes current branch to origin, reports result.
/pushCommits changes using session context for staging, pushes to remote branch, and posts progress comment to associated PR or issue.
/pushPushes local draft changes for posts and pages to Ghost CMS. Handles new posts by creating them and updating local frontmatter with IDs, updates existing posts if modified.
/pushPushes local draft changes for posts and pages to Ghost CMS. Handles new posts by creating them and updating local frontmatter with IDs, updates existing posts if modified.
現在のブランチをリモートへ push する。conflict がある場合は rebase で解消し、auto-merge ワークフローが存在する場合は claude-auto ラベルを PR に付与する。
git branch --show-current で現在のブランチ名を取得するmain または master の場合は エラーを表示して終了 するgit status --porcelain で未コミットの変更を確認するgit fetch origin
以下の優先順で base branch を決定する:
main がリモートに存在するか: git ls-remote --heads origin mainmaster がリモートに存在するか: git ls-remote --heads origin mastergit symbolic-ref refs/remotes/origin/HEAD 2>/dev/null | sed 's@^refs/remotes/origin/@@'git rebase origin/{base-branch}
rebase が成功した場合: ステップ 6 へ進む。
conflict が発生した場合:
git diff --name-only --diff-filter=U で conflict ファイルを特定する<<<<<<<, =======, >>>>>>>)を確認するgit add {file} するgit rebase --continueconflict が複雑すぎる場合(非自明な conflict が 5 ファイル超、またはユーザーが中止を要求):
git rebase --abort
状況を報告し、代替案(merge の使用、手動解消)を提案する。
リモートにブランチが存在するか確認する:
git ls-remote --heads origin $(git branch --show-current)
ブランチがリモートに存在する場合:
git push --force-with-lease
--force-with-lease を使用する(rebase 後のため必要)。--force は 絶対に使わない。
ブランチが新規の場合:
git push -u origin $(git branch --show-current)
.github/workflows/ 配下のファイルに auto-merge の機構が存在するか確認する:
grep -rl "claude-auto" .github/workflows/ 2>/dev/null
該当ファイルが 存在しない場合: ここで終了(通常の push 完了)。
auto-merge 機構が検出された場合、現在のブランチに紐づく PR を確認する:
gh pr view --json number --jq '.number' 2>/dev/null
PR が存在する場合:
claude-auto ラベルが既に付いているか確認する:gh pr view --json labels --jq '[.labels[].name] | any(. == "claude-auto")'
gh pr edit --add-label "claude-auto"
PR が存在しない場合: ラベル付与はスキップする(PR 作成は create-pr コマンドの責務)。
以下を表示する:
claude-auto ラベルが付与されたか(auto-merge 機構がある場合のみ)main または master ブランチでの pushgit push --force の使用(--force-with-lease のみ許可)--no-verify フラグの使用