多年来,我一直在提交更改之前输入git add .
。从下面的消息中我了解到,现代化的等效方式应该是git add --ignore-removal <pathspec>
,这种方式稍微有点啰嗦。在即将发布的2.0版本中是否有办法恢复旧的行为,或者至少在当前版本中静音此消息?
$ 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 'log/sunspot-solr-development.log.lck' 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 add .
。现在收到这些“警告”,并想知道我是否错误地使用了Git?每天肯定有数十万次提交,不可能所有人都打出git add --ignore-removal
。我甚至不确定那是什么意思。有人知道为什么他们做出了这个改变吗? - Meltemi--ignore-removal
选项。 - VonC