LoginSignup
18
15

More than 5 years have passed since last update.

特定のリポジトリのuser.nameとuser.emailを変える

Posted at

Gitを入れたときに以下のコマンドでユーザー情報設定しました。

$ git config --global user.name "name"
$ git config --global user.email "sample@sample.com"

特定のリポジトリでは、このuser.nameとuser.emailを使いたくないってのが出てきた場合、変更したいリポジトリに移動して以下をたたけばOK。
git commitの前に設定しないと、変更されません。

$ git config user.name "name2"
$ git config user.email "sample2@sample.com"

設定した情報はこれで確認できます。

$ git config -l
18
15
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
18
15