From git-actions
Git プッシュワークフローの実行。現在のブランチをリモートリポジトリに安全にプッシュする。Use when user wants to push commits, push to remote, or sync with remote repository.
How this skill is triggered — by the user, by Claude, or both
Slash command
/git-actions:pushThis skill is limited to the following tools:
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
このスキルは Git プッシュの全ワークフローを提供します。
このスキルは Git プッシュの全ワークフローを提供します。
重要: git コマンドは作業ディレクトリで直接実行する。git -C は使用禁止。
以下の git コマンドを並列で実行:
git status # コミットされていない変更
git branch -vv # ブランチとトラッキング状態
git log @{u}..HEAD --oneline 2>/dev/null || echo "No upstream" # プッシュ予定のコミット
以下を確認:
| ケース | 対応 |
|---|---|
| force push が必要 | AskUserQuestion ツールで明示的な確認を取る |
| コミットされていない変更がある | 先にコミットするか確認 |
# アップストリームが設定されていない場合
git push -u origin <current-branch>
# アップストリームが設定済みの場合
git push
プッシュ後、成功メッセージまたはエラーを報告する。
--force または -f: force push を実行(ユーザー確認後のみ)--set-upstream または -u: アップストリームを設定してプッシュ--force-with-lease なしの force push は非推奨| エラー | 対応 |
|---|---|
| ネットワークエラー | リトライを提案 |
| 認証エラー | 認証設定の確認を促す |
| リモートが先行 | pull --rebase を提案 |
| reject(non-fast-forward) | 状況を説明し、rebase または force の判断を仰ぐ |
# 状態確認
$ git status
On branch feature/add-login
Your branch is ahead of 'origin/feature/add-login' by 2 commits.
# プッシュ実行
$ git push
Enumerating objects: 10, done.
...
To github.com:user/repo.git
abc1234..def5678 feature/add-login -> feature/add-login
# アップストリーム未設定の場合
$ git push -u origin feature/new-feature
Branch 'feature/new-feature' set up to track remote branch 'feature/new-feature' from 'origin'.
⚠️ force push が必要です。
現在の状態:
- ローカル: abc1234
- リモート: xyz9876(diverged)
force push を実行しますか?
注意: リモートの変更が失われる可能性があります。
[確認後のみ実行]
$ git push --force-with-lease
npx claudepluginhub biwakonbu/cc-plugins --plugin git-actionsPushes local Git commits to remote repositories, handling branch tracking, upstream setup, safe push patterns like force-with-lease, and verification. Useful after local commits when syncing to remote.
Commits git changes with auto-generated message and pushes to origin after analyzing status/diffs, staging specifics, skipping secrets, and warning on main/master branches.