工作常用之SVN命令

SVN命令

  1. 检出代码库(Checkout):

    1
    svn checkout <repository_url>
  2. 更新代码库(Update):

    1
    svn update
  3. 添加文件或目录(Add):

    1
    svn add <file_or_directory>
  4. 提交修改(Commit):

    1
    svn commit -m "Commit message"
  5. 查看文件或目录状态(Status):

    1
    svn status
  6. 查看文件或目录差异(Diff):

    1
    svn diff <file_or_directory>
  7. 恢复文件或目录到上一个版本(Revert):

    1
    svn revert <file_or_directory>
  8. 删除文件或目录(Delete):

    1
    svn delete <file_or_directory>
  9. 移动或重命名文件或目录(Move/Rename):

    1
    svn move <source> <destination>
  10. 查看日志(Log):

    1
    svn log
  11. 创建分支(Branch):

    1
    svn copy <source> <destination>
  12. 合并分支(Merge):

    1
    svn merge <source> <destination>
  13. 切换到特定版本(Switch):

    1
    svn switch -r <revision> <repository_url>