LoginSignup
34

More than 5 years have passed since last update.

gitconfigのincludeが便利

Last updated at Posted at 2014-03-18

gitconfigをGitHubで管理したいけどメールアドレスを公開したくない、どうしようと思っていたらincludeを使えば設定を別ファイルに書けるらしい。

.gitconfig

[include]
    path = .gitconfig.local

.gitconfig.local

[user]
    name = xxx xxx
    email = xxx@xxx

ちなみにincludeの書き方は絶対パス、相対パス以外にチルダも使えて、

[include]
    path = ~/.gitconfig.local

こう書けば$HOMEディレクトリにある.gitconfig.localを見てくれる。

詳細は以下を参照
http://git-scm.com/docs/git-config

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
34