zoukankan      html  css  js  c++  java
  • svn命令

    1.检出、更新、提交

      svn chectout http://svn_server/xxx_repository/trunk 

      svn update 

      svn commit -m "XXX"

    2.切换
      svn switch http://svn_server/xxx_repository/branch_1231

    3.导出
      svn export http://svn_server/xxx_repository/branch_1231 (不带.svn 信息)

    4.设置目录更新方式

      svn up --set-depth empty

      svn up --set-depth infinity subsvnurl

      svn up --set-depth=exclude subsvnurl

    5.创建branch

      svn copy http://svn_server/xxx_repository/trunk http://svn_server/xxx_repository/tags/release-1.0 -m "1.0 released"

      svn cp -m "create branch" http://svn_server/xxx_repository/trunk http://svn_server/xxx_repository/branches/br_1231

    6.合并分支

      svn co http://svn_server/xxx_repository/branches/br_1231 

      cd br_1231 

      svn merge http://svn_server/xxx_repository/trunk 

          svn mergeinfo http://svn_server/xxx_repository/trunk --show-revs eligible  预览刷新 或使用选项 svn merge --dry-run 以获取更为详尽的信息。

    7.分支合并到主干

      cd trunk 

      svn merge --reintegrate http://svn_server/xxx_repository/branches/br_feature001 

      分支合并到主干中完成后应当删该分支,因为在SVN中该分支已经不能进行刷新也不能合并到主干。

      合并版本并将合并后的结果应用到现有的分支上

      svn -r 148:149 merge http://svn_server/xxx_repository/trunk

    8. 打tags标记 稳定版本版本

      svn copy -m "    " http://svn_server/xxx_repository/trunk http://svn_server/xxx_repository/tags/release-1.0 -m "1.0 released"

    9.删除branch或tags

      svn rm http://svn_server/xxx_repository/branches/br_1231
      svn rm http://svn_server/xxx_repository/tags/tag_1.0.0

    10.tag branch 区别

      cvs branch 和 tag 区分比较明确,只是一个cvs 版本标记别名而已,所以并不能像分支一样能够修改提交。

      svn都是使用copy实现的,所以他们在默认的权限上和一般的目录没有区别。

      只是命名上沿用cvs上的命名方式,branch 用于不用的版本开发,tag用于发布、测试。

     11. 当svn 服务器地址迁移时需要重新定位

       svn switch --relocate (Old Repository Root) (New Repository Root)

       Old Repository Root可以通过:svn info来查看.

       svn update就可以正常的更新你的系统

    12. revert 放弃修改 文件、目录

      svn revert file

      svn revert --depth=infinity . 

  • 相关阅读:
    Azure PowerShell (2) 修改Azure订阅名称
    Windows Azure Platform Introduction (11) 了解Org ID、Windows Azure订阅、账户
    Azure PowerShell (3) 上传证书
    Azure PowerShell (1) PowerShell入门
    Windows Azure Service Bus (2) 队列(Queue)入门
    Windows Azure Service Bus (1) 基础
    Windows Azure Cloud Service (10) Role的生命周期
    Windows Azure Cloud Service (36) 在Azure Cloud Service配置SSL证书
    Android studio 使用心得(一)—android studio快速掌握快捷键
    android 签名、混淆打包
  • 原文地址:https://www.cnblogs.com/liulebao/p/4202919.html
Copyright © 2011-2022 走看看