21
19

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

direnvを使ってgitのユーザ名とメールを切り替え

Posted at

gitのuser.nameとuser.emailを会社/個人で自動的に切り替える方法 を見て。

direnvを使って.envrcに以下のようにしておけば、簡単に切り替えられます。

if has git; then
    git config user.name "Isao Sugimoto"
    git config user.email "d6rkaiz@gmail.com"
fi

has についてはdirenvをインストールしていれば使える関数です。

21
19
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
21
19

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?