Skip to content

brandonzylstra/git-handyman

Repository files navigation

🛠️ Git Handyman 🧰

Let someone else handle your fixup chores

Git Handyman creates a series of fixup commits for the corrections to your previous commits.

  • when your LLM didn't format code properly
  • when see annoying little errors whose corrections you don't want to be in their own commit

Overview

Git Handyman analyzes a file with unstaged changes and:

  1. Identifies which lines have been modified
  2. Uses git blame to find the original commit for each changed line
  3. Groups changes by their original commit
  4. Stages only the changes belonging to each commit
  5. Creates fixup commits that can be applied with git rebase --autosquash

This is particularly useful when you've made multiple small fixes across different parts of a file that belong to different logical commits.

Installation

To install in /usr/local/bin, first ensure you have Go 1.21+ installed, and then (after cloning and entering this repo) run

make install

If you want to put it somewhere else, like ~/bin or ~/.local, you can move it there after building it:

make build
mv -i git-handyman $HOME/bin # or wherever you prefer

Usage

git handyman <filename>

Development

# Build
make build

# Run tests
make test

# Format and lint
make check

# Build for all platforms
make build-all

# See all targets
make help

About

🛠️ Let someone else handle your fixup chores 🧰

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors