svn propset

svn通过属性来判断如何处理仓库中的文件。其中有一个属性便是svn:ignore。你可以使用 svn propset 来设置svn:ignore在单独的目录。你可以给svn:ignore设置一个值,文件名或者是表达式。

svn propset svn:ignore .git --force
svn propset svn:ignore .idea .git .
svn propset svn:global-ignores .idea .git .

svn add

Add files, directories, or symbolic links.

svn add . --force
svn add . --no-ignore --force


  • –auto-props
  • –depth ARG
  • –force
  • –no-auto-props
  • –no-ignore
  • –parents
  • –quiet (-q)
  • –targets FILENAME

Normally, the command svn add * will skip over any directories that are already under version control. Sometimes, however, you may want to add every unversioned object in your working copy, including those hiding deeper. Passing the --force option makes svn add recurse into versioned directories:

svn add * --force

svn log

svn log -l 3
svn log -l 4

svn status

svn status
svn status --no-ignore


svn status | grep '\!' | awk '{print $2;}' | xargs svn rm
svn st | grep ! | cut -d! -f2| sed 's/^ *//' | sed 's/^/"/g' | sed 's/$/"/g' | xargs svn rm

svn commit

svn commit -m "SVN readme."

svn revert


svn revert --depth infinity example_folder
svn revert --recursive example_folder


  • empty  只包含目标文件或目录,不包含子目录
  • files    只包含目标文件和子文件
  • immediates 只包含目标文件及相邻的文件,目录
  • infinity 所有文件,目录,子目录