By
Justin Wu
更新日期:
仅提交新增、修改和删除的文件
1
| svn ci `svn st |sed '/^?/d' | sed 's/^[AMD]//' |tr '\n' ' '` -m 'commit message'
|
Merge from trunk to branch
1
| svn merge -rLastRevisionMergedFromTrunkToBranch:HEAD url/of/trunk path/to/branch/wc
|
Find files without .svn folders
1 2
| find . -path '*/.svn*' -prune -o -print find . -name .svn -a -type d -prune -o -print
|
获取已删除的分支代码
1
| svn cp svn://myrepo.com/svn/branches/feature-xxx@1993 feature-xxx
|
忽略文件夹
1 2 3
| $ mkdir spool $ svn propset svn:ignore 'spool' . $ svn ci -m 'Ignoring a directory called "spool".'
|
若已经创建了文件夹,并加入了版本控制,现在想忽略这个文件夹,但要保持文件夹的内容
1 2 3 4 5 6
| $ svn export spool spool-tmp $ svn rm spool $ svn ci -m 'Removing inadvertently added directory "spool".' $ mv spool-tmp spool $ svn propset svn:ignore 'spool' . $ svn ci -m 'Ignoring a directory called "spool”.'
|
SVN revert all properties changes
1
| svn revert `svn st | grep ' M' | cut -d" " -f8`
|
SVN rollback to old version
1
| svn cat -r xxx filename.txt > filename.txt
|
仅提交property变动
1
| $svn commit --depth empty . -m "Modify svn externals definition only."
|
其他