-
$HOME/.git_template/hooks/pre-commit
を設置 -
$HOME/.gitconfig
に以下を追記[init] templatedir = ~/.git_template
Created
June 20, 2018 23:29
-
-
Save but80/988bcc90e58ad20d50dd1fe88ad58a7a to your computer and use it in GitHub Desktop.
gitリポジトリごとに明示的なユーザ名の設定を求める
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
#!/bin/sh | |
if [ -z "`git config --local user.name`" ]; then | |
echo "fatal: user.name is not set locally" >&2 | |
exit 1 | |
fi | |
if [ -z "`git config --local user.email`" ]; then | |
echo "fatal: user.email is not set locally" >&2 | |
exit 1 | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment