🌟
Git Repository ごとにユーザーを使い分ける
Git Repository ごとにユーザーを切り替える必要が出てきたので実施した手順をメモしておく。
-
異なるユーザーで誤ってコミットしないように
user.nameとuser.emailをリセット。git config --global --unset user.name git config --global --unset user.email -
ローカルリポジトリごとに
user.nameとuser.emailをセット。git config --local user.name "fehde" git config --local user.email "fehde@hoge.com" -
git-credential-manager-core設定を追加。git config --local credential.namespace fehde
以上で Credential Manager を用いてリポジトリをユーザー毎に使い分けた。
Discussion