0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

.gitconfigでRepositoryごとで使いたい名前やメールアドレスなどを変えたい時に

Posted at

はじめに

  • Repositoryごとで都度「git config --local user.xxxx」 をするのが面倒になったため、楽をするための設定をここに

設定方法の抜粋

  • includeの説明

    • includeIfを使って対象ディレクトリごとで読み込ませる設定ファイルを切り替えよう
    .gitconfig
    [includeIf "gitdir:/path/to/A/.git"]
        path = /path/to/A
    
    [includeIf "gitdir:/path/to/B/.git"]
        path = /path/to/B
    
    .gitconfig.A or .gitconfig.B
    [user]
        email = xxxx@yyyy.yyy
        name = zzz
    
0
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
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?