2017-07-31から1日間の記事一覧

会社アカウント等での個人 git への誤 commit 防止

下記のシェルスクリプトを ~/.git_tempalte/hooks/pre-commit として保存 #!/bin/bash DIR=$(pwd) EMAIL=$(git config user.email) if [[ "$DIR" =~ ^/home/hogehoge/private/ ]] then if [[ ! "$EMAIL" =~ @users.noreply.github.com$ ]] then echo "Error:…