git add之间的任何区别。和git add --all? [英] Any difference between git add . and git add --all?
本文介绍了git add之间的任何区别。和git add --all?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
有没有区别:
git add .
和
git add --all
?
推荐答案
git add --all
也会添加已删除的文件(在工作树中),而 git add。
不会。
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
或
git add --all
这篇关于git add之间的任何区别。和git add --all?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文