1. 程式人生 > >git add .出錯解決方法

git add .出錯解決方法

近期我和往常一樣準備提交更改,但是出現了下面這個提示,以前沒見過,然後我去查了一下,找到了解決方法

[[email protected] configure]# 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 'hh.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.

解決方法很簡單,把add .改成

git add -A

或者

git add -all

然後就行了