LoginSignup
1
0

More than 5 years have passed since last update.

特定のリポジトリでコミットしたときのアカウントを変える方法

Posted at

会社アカウントのGitlab(Github)の特定リポジトリを自宅PCで作業してコミットしたときに、コミット履歴を会社アカウント名で表示させる方法

nameとe-mailを変更

「git config local」のデータを変更すると、その特定リポジトリのみアカウントが変わる

変更箇所を確認

command
$ git config --local --list
  • user.name
  • user.email

上記の設定を会社アカウントに変更する

設定

command
$ git config --local user.name hoge
$ git config --local user.email fuga@foo.bar

下記に変わっていれば設定完了

command
$ git config --local --list
user.name=hoge
user.email=fuga@foo.bar

参考サイト

1
0
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
1
0