本地搭建SVN服务
浏览:3245次 出处信息
别看用起SVN很熟,每天commit、revert很欢,真要自己在Mac上搭起来个SVN server,本地可以checkout,创建branch,merge,就没那么熟悉了。
查了查资料,过程如下:
1. 创建本地repo
localhost:~ twer$ cd localhost:~ twer$ svnadmin create SVNRepo
2. 修改两个conf文件,打开访问权限,并添加授权用户
localhost:~ twer$ cd SVNRepo/ localhost:SVNRepo twer$ edit conf/svnserve.conf localhost:SVNRepo twer$ edit conf/passwd
3. 创建trunk目录
localhost:SVNRepo twer$ svn mkdir file:///Users/twer/SVNRepo/trunk -m "create trunk"
4. 创建测试文件,并import到trunk
localhost:SVNRepo twer$ touch test.file localhost:SVNRepo twer$ edit test.file localhost:~ twer$ svn import test.file file:///Users/twer/SVNRepo/trunk/test.file -m"import file"
5. 启动svn server
localhost:~ twer$ cd SVNRepo localhost:SVNRepo twer$ svnserve -d
6. 转移到working directory,checkout trunk
localhost:working_dir twer$ svn checkout svn://localhost/Users/twer/SVNRepo/trunk trunk
7. 新建branch
localhost:SVNRepo twer$ svn copy svn://localhost/Users/twer/SVNRepo/trunk svn://localhost/Users/twer/SVNRepo/branch -m"create branch"
8. checkout branch到新的branch目录
localhost:working_dir twer$ svn checkout svn://localhost/Users/twer/SVNRepo/branch branch
9. 修改test文件,提交
localhost:branch twer$ edit test.file localhost:branch twer$ svn ci -m"change test.file"
10. 回到trunk目录,merge branch的变化
localhost:trunk twer$ svn merge svn://localhost/Users/twer/SVNRepo/branch
建议继续学习:
- 最近总结的一些技巧(vim,python,svn,fiddler等) (阅读:7845)
- SVN Hook造成SVN提交速度慢的问题 (阅读:5939)
- GIT和SVN之间的五个基本区别 (阅读:5549)
- 利用tortoiseSVN在两个版本库间merge code (阅读:4691)
- 为何改用Git (阅读:4679)
- 让虚拟主机也用上SVN:适用于个人的开发部署方式 (阅读:4580)
- 分享一个固定时间自动更新svn的简单shell脚本 (阅读:3971)
- 有关 SVN、Cygwin 和 Notepad++ (阅读:3736)
- 如何在Myeclipse下安装和使用svn客户端插件 (阅读:3153)
- SVN小记 (阅读:3100)
QQ技术交流群:445447336,欢迎加入!
扫一扫订阅我的微信号:IT技术博客大学习
扫一扫订阅我的微信号:IT技术博客大学习
<< 前一篇:Erlang虚拟机内存使用问题以及监控
文章信息
- 作者:zhangkf 来源: IDEAL Garden
- 标签: SVN
- 发布时间:2011-12-11 16:04:18
建议继续学习
近3天十大热文
-
[321] WordPress插件开发 -- 在插件使用 -
[150] 解决 nginx 反向代理网页首尾出现神秘字 -
[91] IOS安全–浅谈关于IOS加固的几种方法 -
[51] 到底什么是MVC? -
[50] Linux Used内存到底哪里去了? -
[50] 二维码的生成细节和原理 -
[48] Shell的那些事儿 -
[47] Hacker News 排名算法工作原理 -
[47] 中间件和稳定性平台 -
[47] 浏览器的工作原理:新式网络浏览器幕后揭秘
