Last active
June 18, 2018 07:42
-
-
Save caugner/acd33852272493278e3fb49e3db2c788 to your computer and use it in GitHub Desktop.
`git commit --fixup` all changes per file to the last commit of the file
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
gfxpf() { | |
git reset | |
for file in $(git ls-files --modified) | |
do | |
git add $file | |
git commit --fixup=$(git log -1 --pretty=format:%h $file) | |
done | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment