Last active
December 26, 2015 09:29
-
-
Save rawsyntax/7129614 to your computer and use it in GitHub Desktop.
set git user email automatically
This file contains hidden or 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 ruby | |
| work_email = 'eric@intridea.com' | |
| if `pwd` =~ /^\/Users\/eric\/src\/intridea/ && | |
| `git config --get user.email`.strip != work_email | |
| `git config --add user.email #{work_email}` | |
| end |
This file contains hidden or 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 | |
| git config --global init.templatedir ~/.git_templates | |
| mkdir -p ~/.git_templates/hooks |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
put
post-checkoutin~/.git_templates/hooksand make executable