2017-06-21 135 views

回答

4

你是對的。 Reading the changelog for git 2.0.

git add <path>是一樣的「git add -A <path>」現在,讓 「git add dir/」會發現你的路徑從目錄和 記錄去除去除。
在舊版本的Git中,「git add <path>」用於忽略刪除。

你可以說「git add --ignore-removal <path>」到 如果你真的想在<path>上只添加添加或修改的路徑。

所以執行

git add . 

將包括刪除的文件。

要獲得git add前2.0

git add --ignore-removal . 

執行這個從添加操作將「排除」刪除文件舊的行爲。


編輯:我做了周圍的一些話題進一步谷歌上搜索,發現this wonderful answer that expands on what I said.