Last active
December 30, 2016 06:06
-
-
Save shiva/7f5ab9dbc7ed5bea59a4ce03aa2c9fb8 to your computer and use it in GitHub Desktop.
Remove trailing whitespaces in all of the files modified in the last git commit
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
alias remove-whitespace='sed -e '\''s/[[:blank:]]\+$//'\'' -i' | |
alias remove-ws-in-last-commit= 'for f in `git show --name-only --pretty=""`; do echo $f; remove-whitespace $f; done' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment