commit-push

Create Git commits with descriptive messages and branch safety checks.

Updated Jan 26, 2026
One-click install
npx skills add https://github.com/fairy-pitta/claude-dotfiles --skill commit-push-fairy-pitta
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: commit-push
Source: https://github.com/fairy-pitta/claude-dotfiles/tree/main/skills/commit-push
Command: npx skills add https://github.com/fairy-pitta/claude-dotfiles --skill commit-push-fairy-pitta

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill streamlines the process of committing and pushing code changes, ensuring that changes are well-documented, atomic, and safely integrated into the repository.

Core Features & Use Cases

  • Strategic Committing: Creates new commits by default, with options for squashing or interactive rebasing when explicitly requested.
  • Commit Message Best Practices: Guides users to write clear, informative commit messages that explain the "why" behind changes, not just the "what".
  • Branch Safety: Prevents direct commits to main branches (main, master, dev) and prompts for branch creation.
  • Pre-commit Hook Handling: Manages failures in pre-commit hooks by ensuring new commits are created after fixes, never amending.
  • Use Case: After implementing a new feature and fixing a bug, use this skill to create two separate, well-described commits, ensuring each change is independently trackable and reversible.

Quick Start

Use the commit-push skill to commit your staged changes with a new commit message.

Frequently Asked Questions about commit-push

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I safely commit and push code changes to avoid direct commits to main?

To safely commit and push code, this workflow blocks direct commits to main branches like main, master, and dev, prompting you to create a new branch instead. This ensures changes are safely integrated without violating branch protection rules.

What is the best way to write a git commit message for version control?

The best way to write a git commit message is to explain the "why" behind your changes, not just the "what". This practice ensures your code changes are well-documented, atomic, and independently trackable in version control.

How do I handle pre-commit hook failures without amending my previous commit?

To handle pre-commit hook failures without amending, fix the issues and create a completely new commit. This ensures your git history remains clean and never alters existing commits when resolving pre-commit hook errors.

Can I squash or interactively rebase staged changes before pushing to the repository?

Yes, you can squash or interactively rebase staged changes before pushing, but only when explicitly requested. By default, the git workflow creates new commits to keep your repository history atomic and independently reversible.

Why should I create separate commits for a new feature and a bug fix?

You should create separate commits for a new feature and a bug fix to ensure each change is independently trackable and reversible. This strategic committing approach keeps your version control history clean and well-documented.