发布网友 发布时间:2022-04-24 14:46
共1个回答
热心网友 时间:2023-10-17 03:16
git add -u
命令解释:
-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 when -u option is used, all tracked files in the entire working tree are updated (old versions of Git used to limit the update to the current directory and its subdirectories).
简译: 此命令将更新已经存在于存储库中的文件索引。删除及修改与与索引条目相匹配的工作树, 但并不会增加新的文件。
不带<pathspec>参数的 git add -u 命令将会更新所有已经包含在存储库中的文件(旧版本Git只会更新到当前目录及其子目录)