以下命令之间有什么区别?
我试着执行它们,它们会产生相同的结果。
发布于 2018-01-30 22:16:20
git help add
-A, --all, --no-ignore-removal
Update the index not only where the working tree has a file matching <pathspec> but also where the index already has an
entry. This adds, modifies, and removes index entries to match the working tree.
If no <pathspec> is given, the current version of Git defaults to "."; in other words, update all files in the current
directory and its subdirectories. This default will change in a future version of Git, hence the form without <pathspec>
should not be used.
-u, --update
Update the index just where it already has an entry matching <pathspec>. This removes as well as modifies index entries to
match the working tree, but adds no new files.
If no <pathspec> is given, the current version of Git defaults to "."; in other words, update all tracked files in the
current directory and its subdirectories. This default will change in a future version of Git, hence the form without
<pathspec> should not be used..,则-A和-u都暗示了<pathspec> (在您的问题中是这样的)。-A将进行更改、删除文件和添加文件。-u将进行更改和删除文件,但不添加文件。https://stackoverflow.com/questions/48531321
复制相似问题