update所有已跟踪的文件
git add -u
添加所有“已跟踪”或“未跟踪”的文件
git add -A
查看git add help 信息:
git add -h
-n, --dry-run dry run
-v, --verbose be verbose
-i, --interactive interactive picking
-p, --patch select hunks interactively
-e, --edit edit current diff and apply
-f, --force allow adding otherwise ignored files
-u, --update update tracked files
-N, --intent-to-add record only the fact that the path will be added later
-A, --all add changes from all tracked and untracked files
--ignore-removal ignore paths removed in the working tree (same as --no-all)
--refresh don't add, only refresh the index
--ignore-errors just skip files which cannot be added because of errors
--ignore-missing check if - even missing - files are ignored in dry run
本文详细介绍了Git中用于添加文件的命令,包括更新已跟踪文件的`git add -u`,添加所有已跟踪和未跟踪文件的`git add -A`等。同时,还提供了各种选项说明,如强制添加通常被忽略的文件的`-f`选项等。
4133

被折叠的 条评论
为什么被折叠?



