# Git Commit Push

> Commit and push repository changes safely. Use when user asks to commit, push, or verify and push current changes.

- Skill: `farm-fe/git-commit-push` (Agent Skill)
- Install (CLI): `npx skillmds@latest add farm-fe/git-commit-push`
- Raw SKILL.md: https://api.skillmd.com/api/skills/farm-fe/git-commit-push/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- License: MIT
- Author: farm-fe (https://skillmd.com/u/farm-fe)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/farm-fe/git-commit-push

---


Safely commit and push changes for the current branch.

## Steps

1. Check current branch and repo status
   - `git branch --show-current`
   - `git status --short`

2. Validate commit preconditions
   - If no changes: stop and report nothing to commit.
   - If merge conflicts exist: stop and ask user for conflict resolution direction.

3. Stage changes
   - Default: `git add -A`
   - If user specifies paths, only stage those.

4. Create commit
   - Use user-provided commit message.
   - If none is provided, draft a concise conventional message and ask for confirmation.
   - Run `git commit -m "<message>"`.

5. Push changes
   - Run `git push`.

6. Report result
   - Include branch name, commit hash, commit title, and push destination.
   - Include final `git status --short` result.

## Guardrails

- Never use destructive git operations (force push, reset --hard, checkout --) unless explicitly requested.
- Do not amend commits unless explicitly requested.
- If hooks fail, surface the first failure and stop.

