Created
April 17, 2015 05:54
-
-
Save kenzo0107/db07d64898cc4b6418ed to your computer and use it in GitHub Desktop.
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
# gitリポジトリのトップ階層へ移動 | |
cd `git rev-parse --show-toplevel` | |
# hook sh配置用ディレクトリ作成 | |
mkdir -p .git_template/hooks | |
# pre-commit作成 | |
vim .git_template/hooks/pre-commit | |
# pre-commitに実行権限付与 | |
chmod 755 ~/.git_template/hooks/pre-commit | |
# git configに設定 | |
git config --global init.templatedir '~/.git_template' | |
# .git/hooks/pre-commit作成済みの場合、リネーム | |
mv .git/hooks/pre-commit ./git/hooks/pre-commit.backup | |
# hooks再インストール/pre-commitの設定反映 | |
git init |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment