Any difference between git add . and git add --all?

核能气质少年 提交于 2019-12-03 05:40:56

问题


Is there any difference between:

git add .

and

git add --all

?


回答1:


git add --all will add the deleted file too (removing files from index that are no longer in the working tree), while git add . does not.

For new files and files already tracked in current working tree:

git add .

For only files already tracked in current working tree:

git add -u

For new files, files already tracked in current working tree, and remove files from index that are no longer in the working tree:

git add -A

or

git add --all


来源:https://stackoverflow.com/questions/23003118/any-difference-between-git-add-and-git-add-all

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!