commit-push
/commit-push
Commit changes and push to the current branch remote. Use when you want to commit local changes and push them upstream in one workflow, with branch protection against main/master.
- Author
- heyAyushh ↗
- Repository
- stacc ↗
- Licence
- MIT
- Last repository change
- 21.09.2026
Assessment and security
- Files in this package
- 1
- Scripts
- 0
- HTML comments
- 0
- URLs in SKILL.md
- 0
No signals detected. Repository changed on 21.09.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
Commit changes and push to the current branch remote. Use when you want to commit local changes and push them upstream in one workflow, with branch protection against main/master.
Original author description
Commit changes and push to the current branch remote. Use when you want to commit local changes and push them upstream in one workflow, with branch protection against main/master.
How it works
- Steps
- One-liner
- Notes
SKILL.md preview
---
name: commit-push
description: Commit changes and push to the current branch remote. Use when you want to commit local changes and push them upstream in one workflow, with branch protection against main/master.
---
# Commit and Push
Commit changes on the current branch and push to the remote.
## Steps
1. **Check branch (prevent direct pushes to main/master)**
```bash
BRANCH=$(git branch --show-current)
if [ "$BRANCH" = "main" ] || [ "$BRANCH" = "master" ]; then
echo "Direct pushes to main/master are not allowed"
exit 1
fi
```
2. **Stage changes**
```bash
git add -A
```
3. **Commit**
```bash
git commit -m "<prefix>: <summary (imperative, concise)>"
```
4. **Push**
```bash
git push -u origin "$BRANCH"
```
## One-liner
```bash
MSG="fix: remove unnecessary debug log output" \
BRANCH=$(git branch --show-current) && \
if [ "$BRANCH" = "main" ] || [ "$BRANCH" = "master" ]; then \
echo "Direct pushes to main/master not allowed"; exit 1; \
fi && \
git add -A && git commit -m "$MSG" && git push -u origin "$BRANCH"
```
## Notes
- Always review diffs with `git status` or `git diff` before executing
- Use conventional commit prefixes: feat, fix, refactor, perf, test, docs, build, ci, chore, style, revert
Versions
| Repository | Score | Licence |
|---|---|---|
| This page · heyAyushh/stacc | 100 | MIT |
| frostiks777/harness | 100 | MIT |
| nebius/nebius-ps-services | 100 | Apache-2.0 |
| mo-cmyk/mazarbul | 100 | Apache-2.0 |
| heyAyushh/stacc | 100 | MIT |
| workerstack/clients | 91 | MIT |
| redpanda-data/ui-harness | 90 | MIT |
| 81wallace18/codex-skills | 85 | MIT |
| workerstack/repo | 82 | MIT |
Identical content appears in 2 other GitHub folders. We show one copy with the highest score.
Database snapshot: 13.11.2026 · package version aa2573eb183f (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
- 100commit-push-pr
Commit changes, push to remote, and create a pull request in one step. Use when user wants to ship changes end-to-end. Handles GPG signing, branch creation if on main/master, and PR creation via gh CLI. - 90commit-push-current
Use when a human explicitly asks to commit and push to the checked-out branch with no branch creation and no pull request. Not for the default branch: use commit-push-main; not for a pull request: use commit-push-pr. - 90commit-push-main
Use when a human explicitly asks to commit and push directly to the default branch, with no feature branch and no pull request. Not for another checked-out branch: use commit-push-current. - 100commit-push-pr
Review, commit, push, and create a pull request through the current branch's configured upstream. Use when you want to ship deliberate changes end-to-end without assuming a particular remote or base branch. - 100git-pushing
Stage all changes, create a conventional commit, and push to the remote branch. Use when explicitly asks to push changes (\"push this\", \"commit and push\"), mentions saving work to remote (\"save to github\", \"push to remote\"), or completes a feature and wants to share it. - 90commit
Stage, commit, and push changes to the current branch. Use when asked to commit, push, or create a commit for the current task.