./fixup_to_last_changed.sh <file> <file> <file> [optional git cli flags]
./fixup_to_last_changed.sh <file>
- will find the last commit wherefile
was changed, and create a fixup commit for that commit../fixup_to_last_changed.sh <file> <file1>
- 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 <file> --no-verify
- fixup's one file, but using--no-verify
in the commit.
This allows you to run the script via git fixlastchange <file> <file>
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
...