LoginSignup
4
7

More than 5 years have passed since last update.

.DS_Storeがgit上に残ってしまった時の対処法

Posted at

gitignore_globalに.DS_Storeを入れてあげれば大丈夫でした。

<手順>
ルートディレクトリに戻って

vi ~/.gitignore_global

vimエディタが立ち上がるので

iキーを押してINSERTモードに。
その中に

.DS_Store

と記述してescキーを押して
:wqで保存をしてエディタから抜けます。

gitignoreの設定ができてない場合はgit statusとかしてもDS_Storeが残ったままになるので、その場合は下記のコマンドを打てば問題なく解決するかと思います。

git config --global core.excludesfile ~/.gitignore_global
4
7
1

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
4
7