push
/push
Check the commits and target, ask how to merge if the remote is ahead, then push. Use for "push", "push to remote".
- Author
- JQ-WCoding ↗
- Repository
- devkit ↗
- Licence
- MIT
- Last repository change
- 13.11.2026
Assessment and security
- Files in this package
- 2
- Scripts
- 0
- HTML comments
- 0
- URLs in SKILL.md
- 0
No signals detected. Repository changed on 13.11.2026, without references to retired models or APIs.
MIT, open: use and modify while retaining author attribution.
What it does and when to use it
Check the commits and target, ask how to merge if the remote is ahead, then push. Use for "push", "push to remote".
Triggers from the description
Arguments
/push [remote] [branch]
Original author description
Check the commits and target, ask how to merge if the remote is ahead, then push. Use for "push", "push to remote".
How it works
- 1. Check the target
- 2. Blocked cases
- 3. When the remote is ahead
- 4. Push
- 5. Report
SKILL.md preview
---
name: push
description: Check the commits and target, ask how to merge if the remote is ahead, then push. Use for "push", "push to remote".
argument-hint: "[remote] [branch]"
---
# Push
Branch and merge rules in `docs/rules/git.md` take precedence.
## 1. Check the target
```bash
git status --porcelain
git rev-parse --abbrev-ref HEAD
git rev-parse --abbrev-ref --symbolic-full-name @{u} # fails if there is no upstream
git ls-remote --heads <remote> <branch> # empty means a new branch
```
| Case | Commits to push | Commits only on the remote |
|---|---|---|
| Branch exists on the remote | `git fetch --no-tags <remote> <branch>`, then `git log --oneline <remote>/<branch>..HEAD` | `git log --oneline HEAD..<remote>/<branch>` |
| New branch | `git log --oneline HEAD --not --remotes=<remote>` | None |
- Remote: argument → upstream's remote → `origin`. Branch: argument → current branch.
- Say that uncommitted changes will not be pushed (do not commit them).
- Show the list of commits to push. If commits unrelated to this task are mixed in, ask.
## 2. Blocked cases
- **Force push** (`--force`, `--force-with-lease`) is not done. Even when the user explicitly asks, show the remote commits that would be overwritten, confirm again, and then use only `--force-with-lease`. Never on protected or deploy branches.
- **Protected or deploy branches** (listed in `git.md`, else `main`, `master`, `release/*`, `prod*`): if asked to push directly, stop and say so. If the repo flow merges that branch via PR/MR, suggest `devkit:pr-publish`.
- If a pre-push hook fails, report the cause (`--no-verify` and force are blocked by the devkit guard hook).
## 3. When the remote is ahead
If there are commits only on the remote, do not push; show them and ask how to integrate. Recommend what `git.md` says; without a rule, recommend merge (`git merge <remote>/<branch>`). Rebase rewrites already shared commits, so do it only if the user chooses it. On conflicts, show the conflicted files and wait for instructions.
## 4. Push
```bash
git push <remote> <branch> # upstream exists
git push -u <remote> <branch> # new branch
git log -1 --format=%H <remote>/<branch>
```
## 5. Report
Report the remote, branch, pushed commit range (SHAs) and whether it is a new branch. If the CI config runs a pipeline or deploy on this branch, say so. Create the PR/MR with `devkit:pr-publish` when asked.
Files in this package (2)
- SKILL.md 2 KB
- evals/evals.json 1 KB
Versions
| Repository | Score | Licence |
|---|---|---|
| This page · JQ-WCoding/devkit | 100 | MIT |
| AsiaOstrich/universal-dev-standards | 100 | MIT |
| hamedmp/matrix-os | 100 | AGPL-3.0 |
| AsiaOstrich/universal-dev-standards | 100 | MIT |
| AsiaOstrich/universal-dev-standards | 100 | MIT |
| Mooshieblob1/MooshieUI | 100 | AGPL-3.0 |
| AsiaOstrich/universal-dev-standards | 100 | MIT |
| tibursocampos/agent-dev-toolkit | 100 | MIT |
| technicalpickles/pickled-claude-plugins | 100 | MIT |
Database snapshot: 13.11.2026 · package version 2478af757682 (SHA-256 digest of the entire package)
Downloads in the last 30 days: 0 · ranking
Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.
Similar skills
- 100git-push
Push local commits to remote — handles branch tracking, upstream setup, safe push patterns. Use when user says "push", "send to remote", or "update remote". Pushes existing commits — see git-commit for commits and git-pr for PR creation. - 96commit-and-push
Creates atomic conventional git commits using git-agent and pushes changes to the remote repository. Use when the user asks to "commit and push", "commit with git-agent", or wants an atomic AI-generated commit followed by a push. - 98signal-push
Stage all changes, create a conventional commit, then push to remote. One command for the full local→remote cycle. Use when user types /signal-push, "commit and push", "push everything", "push my changes", or wants to send current changes to remote without manual steps. - 100commit
Use when asked to commit working-tree changes as typed atomic local commits. Not for push, PR, or remote publication: use commit-push-pr. - 100commit-push-pr
Commit changes, push to remote, and create a pull request. Use for completing features or fixes ready for review. - 86commit
Group the working tree into commits, write the messages in the project's style, and ask what to do with them (commit, push, PR, merge). Use whenever work is ready to commit.