# Fixup a bunch of things ## Usage `./fixup_to_last_changed.sh [optional git cli flags]` ## Description - `./fixup_to_last_changed.sh ` - will find the last commit where `file` was changed, and create a fixup commit for that commit. - `./fixup_to_last_changed.sh ` - as above, but individually with two files, creating two fixup commits - `./fixup_to_last_changed.sh` - as above, but with all unstaged files. Confirms before actually creating the commits. - `./fixup_to_last_change.sh --no-verify` - fixup's one file, but using `--no-verify` in the commit. ## Git Alias This allows you to run the script via `git fixlastchange ` `git config --global alias.fixlastchange '! ~/.local/bin/fixup_last_change.sh'` `~/.gitconfig`: ``` ... [alias] fixlast = commit --fix HEAD fixlastchange = ! /Users/tom.whitwell/.local/bin/fixup_last_change.sh ... ```