# Commit Same Branch

> Commit on the current branch with conventional message

- Skill: `emaraschio/commit-same-branch` (Agent Skill, multi-file: 4 files)
- Install (CLI): `npx skillmds@latest add emaraschio/commit-same-branch`
- Raw SKILL.md: https://api.skillmd.com/api/skills/emaraschio/commit-same-branch/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: emaraschio (https://skillmd.com/u/emaraschio)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/emaraschio/commit-same-branch

---

## Overview

Commit changes to the same branch with proper commit message.

## Steps

1. **Write commit message**
   - Must use the conventional commit message convention.
   - Summarize changes clearly

2. **Commit changes**
   - Use a single commit for the changes
   - Commit the changes to the branch
   - Push the changes to the remote repository

## Commit Message Examples

```markdown
feat(scope): add new feature
fix(script): resolve script error
chore(script): update script dependencies
refactor(script): standardize script error handling
test(script): add comprehensive script tests
docs(script): update script documentation
```

## Guardrails

- Commit only when the user asks; do not commit unrequested work.
- Do not push unless asked; keep commits local until the user requests a push.
- Use the Conventional Commits convention for every message.
- Before staging, review `git status`, `git diff`, and recent `git log`; write the commit message with a HEREDOC and stay on the current branch (do not create a new branch).
- Never print, stage, or commit secrets or credential files (.env, .env.*, keys); exclude them and warn instead.
