LoginSignup
18
20

More than 3 years have passed since last update.

mac Git Github .DS_Storeを登録しないようにする

Last updated at Posted at 2019-10-31

目的

  • macで自動生成されるファイル.DS_Storeをgithubのリポジトリの管理から外す方法を記載する。
  • 一回の設定で全てのリポジトリで.DS_Storeを管理から外す。

実施詳細

  1. 下記コマンドを実行してHomeディレクトリに移動する。

    $ cd
    
  2. 下記コマンドを実行して.gitignore_globalファイルを作成する。

    $ vi touch ~/.gitignore_global
    
  3. 開いたtouch ~/.gitignore_globalファイルに下記の内容を記載して保存する。

    .DS_Store
    
  4. 下記コマンドを実行して設定を反映させる

    $ git config --global core.excludesfile ~/.gitignore_global
    
18
20
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
18
20