本手册描述了 Subversion 1.6.x 版本系列。如果您正在运行其他版本的 Subversion,我们强烈建议您访问 https://svnbook.subversion.org.cn/,并查阅与您的 Subversion 版本相匹配的手册版本。
svn add — 添加文件、目录或符号链接。
--auto-props --depth ARG --force --no-auto-props --no-ignore --parents --quiet (-q) --targets FILENAME
将文件添加到您的工作副本
$ 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 --depth=empty otherdir A otherdir
通常,命令 svn add *
会跳过任何已经在版本控制下的目录。但是,有时您可能希望添加工作副本中所有未版本化的对象,包括隐藏在更深层的对象。传递 --force
选项将使 svn add 递归到版本化的目录中
$ svn add * --force A foo.c A somedir/bar.c A (bin) otherdir/docs/baz.doc …