LoginSignup
0
1

More than 1 year has passed since last update.

【Git】.gitignoreって難しい Part3 - .gitignoreの作成未経験者が、ある程度の理解できるまで -

Posted at

.DS_Storeについて

Macのシステムが各ディレクトリ(Finder)に勝手に生成する隠しファイルです。
こちらのファイルは、gitで管理しないのが一般的です。

補足

上記の通り、Macのみで起きる現象のため、プロジェクトの.gitignoreではなく、.gitignore_globalで設定をしてください。
.gitignore_globalPCに存在するGitリポジトリの設定が行えます。

設定方法

.gitignore_global ファイルを作成

viコマンドで編集していきます。

$ vi ~/.gitignore_global

.gitignore_globalファイルに.DS_Storeを追加

.DS_Store

Gitの設定を追加

$ git config --global core.excludesfile ~/.gitignore_global

設定を確認

$ git config --global -l

core.excludesfile=/Users/hoge/.gitignore_globalと表示出来ていれば完成です。

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