Help us understand the problem. What is going on with this article?

まだ .gitconfig に core.excludesfile を設定しているの?

More than 1 year has passed since last update.

グローバルな .gitignore を設定するとき、よくある記事の説明が、

[core]
    excludesfile = /home/${USER}/.gitignore_global

をして、 ${HOME}/.gitignore_global を置くと。

ダメなんだよ・・・・・・!そういうのが実にダメ・・・・!せっかくgitconfigをスカッとしようって時に・・・・その横着は傷ましすぎる・・・・・・・・!

man gitignore を見ると

Patterns which a user wants Git to ignore in all situations (e.g., backup or temporary
files generated by the user’s editor of choice) generally go into a file specified by
core.excludesFile in the user’s ~/.gitconfig. Its default value is
\$XDG_CONFIG_HOME/git/ignore. If \$XDG_CONFIG_HOME is either not set or empty,
\$HOME/.config/git/ignore is used instead.

曰く、core.excludesFile のデフォルト値は $XDG_CONFIG_HOME/git/ignore$XDG_CONFIG_HOMEが空の時は $HOME/.config/git/ignore が使われます。特別な理由が無い限り、 $HOME/.config/git/ignore にグローバルな設定を置くのがgitの流儀となります。

なおグローバルなgitignoreは、GitHubのリポジトリを参考にすると幸せになります。
https://github.com/github/gitignore/tree/master/Global

Why do not you register as a user and use Qiita more conveniently?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
Comments
Sign up for free and join this conversation.
If you already have a Qiita account
Why do not you register as a user and use Qiita more conveniently?
You need to log in to use this function. Qiita can be used more conveniently after logging in.
You seem to be reading articles frequently this month. Qiita can be used more conveniently after logging in.
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away