Skip to content

Instantly share code, notes, and snippets.

@humandb
Created October 2, 2014 15:45
Show Gist options
  • Save humandb/ceb1ca14d85c581d8d84 to your computer and use it in GitHub Desktop.
Save humandb/ceb1ca14d85c581d8d84 to your computer and use it in GitHub Desktop.
Pre-Commit hook to fix type before commiting
#!/bin/sh
#
# Fix common typo in Righster (note, not 't') automatically
git ls-tree -r --name-only HEAD | xargs perl -p -i -e 's/ighster/ightster/g'
git ls-tree -r --name-only HEAD | xargs perl -p -i -e 's/IGHSTER/IGHTSTER/g'
@humandb
Copy link
Author

humandb commented Oct 2, 2014

The content of this file should be in .git/hooks/pre-commit.

@henricook
Copy link

This is brilliant.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment