我運行git add .
時收到此消息。`--all`和`--ignore-removal`之間的區別
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 'config/.deploy.rb.swp' 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的默認行爲將改變--ignore-removal
到--all
。 但我不確定它們有什麼不同。我想有一些例子來理解它。
如果我正確理解說明,如果我使用git add --all .
,我不需要使用git-rm
從存儲庫中刪除文件。是對的嗎?