Skip to content

Git Helper: Version Bump & Changelog Automation

This guide explains how to use the git-helper tool to automate common Git tasks: staging changes, committing, pushing, bumping version numbers, and updating a changelog. git-helper is designed for technical users but is beginner-friendly and interactive.


Features

  • Detect and List Changes: Automatically shows changed and untracked files in your repository.
  • Interactive Staging: Lets you choose which files to add to the next commit.
  • Commit Changes: Prompts for a commit message and commits staged files.
  • Push to Remote: Push your commits to the remote repository.
  • Version Bumping: Easily bump the version (major, minor, or patch) and create a Git tag.
  • Changelog Update: Updates or creates CHANGELOG.md with details of changes, new version, and date.
  • Changelog Commit: Commits and pushes the updated changelog file.
  • Repository and Project Initialization: Initialize new Git repositories or scaffold a new Python project structure.
  • Safe Non-Repo Handling: If run outside a Git repository, guides you to create or initialize one.

Requirements

  • Option 1: Use Prebuilt Binary (Recommended for Windows 11)
  • No Python or pip installation required!
  • Download git-helper.exe from the latest GitHub release.

  • Option 2: Run from Source

  • Python 3.10+ installed on your system.
  • The following Python packages:
    • GitPython (for interacting with Git)
    • semver (for version management)
  • Install these packages using pip:
    python -m pip install GitPython semver
    
  • Clone the repo:
    git clone https://github.com/grinntec/git-helper.git
    cd git-helper
    

Installation

Prebuilt Binary (Windows 11)

  1. Download the binary from GitHub Releases.
  2. (Optional) Move git-helper.exe to a folder of your choice (e.g., C:\Program Files\git-helper\).
  3. (Optional) Add the folder to your system PATH for easy access.
  4. Run the program:
    • From any directory (if on PATH):
      git-helper.exe
      
    • Or by navigating to the folder:
      cd "C:\Program Files\git-helper"
      .\git-helper.exe
      

Run from Source

  1. Install dependencies:
    python -m pip install GitPython semver
    
  2. Run the helper:
    python main.py
    

Usage

  1. Open a terminal (or CMD/PowerShell for Windows).
  2. Navigate to your repository directory, or start in any folder.
  3. Run git-helper (see above).
  4. Follow the interactive prompts to:
  5. Stage files
  6. Enter a commit message
  7. Push changes
  8. Bump version and tag
  9. Update and commit the changelog
  10. Create/init a project if not in a repo

Notes

  • If you are not in a Git repository, git-helper will offer to create a new project or initialize a repository.
  • All operations are interactive and safe: review changes before committing or tagging.
  • For advanced usage or customization, review the source code.
  • For troubleshooting, see the README or open an issue.

Support

Open an issue at GitHub Issues if you need help, have questions, or want to request a feature.