Skip to main content

A tool to simplify Git commit message creation by analyzing changes

Project description

Git Commit Simplifier

A command-line tool that analyzes your Git changes and suggests meaningful commit messages, saving you time and ensuring consistent commit practices.

Features

  • 📊 Smart Analysis: Automatically analyzes staged changes in your Git repository
  • 🗂️ File Categorization: Groups files by type (Python, JavaScript, documentation, etc.)
  • 🔍 Change Detection: Identifies the nature of changes (new feature, bug fix, refactor)
  • Multiple Styles: Supports detailed, conventional, or simple commit message formats
  • 😀 Emoji Support: Optional emoji prefixes for more expressive commits
  • 🔄 Interactive Mode: Select files to stage through an interactive interface
  • ✏️ Edit Before Commit: Review and modify the suggested message
  • 🚀 Auto-Push: Option to push changes immediately after committing
  • ⚙️ Configurable: Customize via command-line options or configuration file

Installation

pip install git-commit-simplifier

Quick Start

Navigate to your Git repository and run:

# Use the short alias 'gcs'
gcs

# Or the full command
git-commit-simplifier

That's it! The tool will analyze your staged changes and suggest an appropriate commit message.

Available Commands

You can use any of these commands - they all do exactly the same thing:

gcs                     # Short alias (recommended)
git_commit_simplifier   # Underscore version
git-commit-simplifier   # Hyphenated version

Usage Examples

# Basic usage
gcs

# Use conventional commit style with emoji
gcs --style conventional --emoji

# Skip preview and use interactive mode for staging
gcs --no-preview --interactive

# Commit and push in one command
gcs --push

# Configure default settings
gcs config --style conventional --emoji --auto-push

Command Options

--path TEXT                     Path to the Git repository (default: current directory)
--preview / --no-preview        Preview changes before committing (default: enabled)
--edit / --no-edit              Edit the commit message before committing (default: enabled)
--push / --no-push              Push changes after committing (default: disabled)
--style [detailed|conventional|simple]
                                Commit message style
--emoji / --no-emoji            Use emoji in commit messages
--interactive / --no-interactive
                                Use interactive mode for staging
--version                       Show the version and exit
--help                          Show this message and exit

Configuration

You can configure default options using the config command:

gcs config --style conventional --emoji --auto-push

Configuration is stored in ~/.git-commit-simplifier.json or .git-commit-simplifier.json in your repository.

Commit Message Styles

Detailed (Default)

Add user authentication

## python
- Add src/auth.py (new file, authentication implementation)
- Update src/app.py (dependency changes, function definition changes)

## configuration
- Add config/auth.yaml (new file)

Conventional

Follows the Conventional Commits specification:

feat(auth): implement user authentication

## python
- Add src/auth.py (new file, authentication implementation)
- Update src/app.py (dependency changes, function definition changes)

## configuration
- Add config/auth.yaml (new file)

Simple

Add user authentication

How It Works

  1. Git Commit Simplifier analyzes your staged changes
  2. It categorizes files and determines the type of changes
  3. Based on this analysis, it generates an appropriate commit message
  4. You can review, edit, and confirm the message before committing
  5. The tool handles the commit (and optionally push) process

License

MIT License

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

git_commit_simplifier-0.1.6.tar.gz (14.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

git_commit_simplifier-0.1.6-py3-none-any.whl (15.6 kB view details)

Uploaded Python 3

File details

Details for the file git_commit_simplifier-0.1.6.tar.gz.

File metadata

  • Download URL: git_commit_simplifier-0.1.6.tar.gz
  • Upload date:
  • Size: 14.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.3 CPython/3.13.3 Darwin/24.4.0

File hashes

Hashes for git_commit_simplifier-0.1.6.tar.gz
Algorithm Hash digest
SHA256 ae2bc5fab65127c4b864907279ccacb064ab09edab52234771da47dc1807f81a
MD5 1b59ea5c1560f2ed6f00c9f0393af1c9
BLAKE2b-256 bebedfd9702840457bc9c5a6590af039ccd333c5374755217470e6cc2042c5a1

See more details on using hashes here.

File details

Details for the file git_commit_simplifier-0.1.6-py3-none-any.whl.

File metadata

File hashes

Hashes for git_commit_simplifier-0.1.6-py3-none-any.whl
Algorithm Hash digest
SHA256 d24c28820d0153dfb0de6f7e4cdb546d4f260138d8e0defb8a3ae33374bad2e0
MD5 be8ebf8219c840d4c7f4848d58899742
BLAKE2b-256 0cf461addfe34920130e6ea13596bee2dce179319794dbfcdae480717955f3e4

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page