0%

Svn 使用记录

Svn 使用记录

changelist 分组

http://www.letuknowit.com/archives/usage-of-svn-changelist/

1
2
3
4
svn cl dept a.txt
svn commit --changelist issue1729 -m "Fixing Issue 1729."
svn commit application/admin/view/system/user application/admin/view/system/dept "部门"
svn commit --changelist dept -m "部门"

恢复指定版本文件

1
svn revert -R 971 public/assets/js/backend/system/role.js

一次向svn中增加所有新增文件

1
2
svn st | awk '{if ( $1 == "?") { print $2}}' | xargs svn add 
svn st | grep '^\?' | tr '^\?' ' ' | sed 's/[ ]*//' | sed 's/[ ]/\\ /g' | xargs svn add

回退版本

1
svn merge -r 971:970 ./

只查看前5条log版本:

1
svn log -l 5

查看 971 版本提交详情:

1
svn log -r 971 -v
------------------------------------------------------------------------
r971 | xiaozhu | 2018-03-14 20:56:40 +0800 (三, 14  3 2018) | 1 line
Changed paths:
   M /php/application/admin/controller/Dept.php
   M /php/application/admin/controller/Role.php
   M /php/application/admin/controller/system/Role.php
   M /php/application/admin/view/dept/add.html
   M /php/application/admin/view/role/add.html
   M /php/application/admin/view/role/edit.html
   M /php/application/admin/view/role/index.html
   D /php/application/admin/view/system/menu/parentNodes.html
   M /php/application/admin/view/system/role/index.html
   M /php/application/database.php
   M /php/public/assets/js/backend/role.js
   M /php/public/assets/js/backend/system/role.js

rm file.
------------------------------------------------------------------------

忽略文件

貌似仅适用于忽略未加入版本控制的文件
vim ~/.subversion/config
[miscellany]
global-ignores = .DS_Store