本手册旨在介绍 Subversion 1.4 版本。如果您使用的是更新版本的 Subversion,我们强烈建议您访问 https://svnbook.subversion.org.cn/ 并参考适合您 Subversion 版本的手册。
svn add — 添加文件、目录或符号链接。
--targets FILENAME --non-recursive (-N) --quiet (-q) --config-dir DIR --no-ignore --auto-props --no-auto-props --force
将文件添加到工作副本
$ svn add foo.c A foo.c
当添加目录时,svn add 的默认行为是递归添加
$ svn add testdir A testdir A testdir/a A testdir/b A testdir/c A testdir/d
您可以添加目录而不添加其内容
$ svn add --non-recursive otherdir A otherdir
通常情况下,命令 svn add * 会跳过所有已经在版本控制下的目录。然而,有时您可能希望添加工作副本中所有未版本化的对象,包括那些隐藏在更深层次的对象。传递 --force 选项可以使 svn add 递归进入版本化的目录
$ svn add * --force A foo.c A somedir/bar.c A otherdir/docs/baz.doc …