【エラー】「git add .」を実行すると「warning: You ran ‘git add’ with neither」というエラーが出てくる

スポンサーリンク
git add .

とするとエラーが出て困ったので、メモ

$ git add .
warning: You ran 'git add' with neither '-A (--all)' or '--ignore-removal',
whose behaviour will change in Git 2.0 with respect to paths you removed.
Paths like '201512.sh' that are
removed from your working tree are ignored with this version of Git.

* 'git add --ignore-removal <pathspec>', which is the current default,
  ignores paths you removed from your working tree.

* 'git add --all <pathspec>' will let you also record the removals.

Run 'git status' to check the paths you removed from your working tree.

git 2.0からgit addの仕様が変わったみたいです。gitで管理するファイルを削除した時の挙動っぽい。

とりあえず

git add --ignore-removal .

とすると削除したファイルを無視して管理してくれるみたいです