首页 技术 正文
技术 2022年11月15日
0 收藏 575 点赞 2,779 浏览 1642 个字

参考:

linux下安装SVN      http://jingyan.baidu.com/article/3c343ff7039de20d37796306.html

svn客户端使用linux篇  http://jeanlyn.sinaapp.com/svn_linux/

==================================

svn使用简介

1)创建目录:

mkdir /home/svn_hl_gg/

cd /home/svn_hl_gg/

2)下载代码:checkout

svn checkout https://192.168.1.105/svn/gg/ .

3)生成文件夹,提交代码

mkdir 22;

cd 22;

echo thisis22 >> 22.txt;

cd ..;

svn add 22;

svn commit -m “create 22 for gg”;//执行这一步之后,代码才算真正上传到服务器了,这个时候管理者和其他组员能在仓库看见此代码。

4)修改代码并上传

vi 22.txt;

[root@localhost 22]# svn commit -m “added version2 for 22.txt”
Sending        22/22.txt
Transmitting file data .
Committed revision 4.

5)删除代码

[root@localhost 22]# svn del 22.txt
D         22.txt
[root@localhost 22]# ls

  ls看到没有代码了,这个时候由于没有提交,服务器上还是有的。但是这个时候用svn update就不能下载到本地了。想要取消操作,可以用svn revert。
[root@localhost 22]# svn revert 22.txt
Reverted ’22.txt’

6) 提交删除

svn del 22.txt

[root@localhost 22]# svn  commit -m “deleted 22.txt”
Deleting       22/22.txt

Committed revision 5.

这个时候代码服务器上的也删掉了。

7)下载更新:

假如其他组员又更新了代码仓库,添加了22n.txt这个文本。我们可以直接在对应文件夹内使用svn update更新本地代码。

[root@localhost 22]# svn update
A    22n.txt
Updated to revision 6.

8)查看当前目录的修改历史:

[root@localhost 22]# svn log
————————————————————————
r6 | hl | 2016-05-28 09:09:09 -0700 (Sat, 28 May 2016) | 1 line

22n
————————————————————————
r5 | hl | 2016-05-28 09:04:20 -0700 (Sat, 28 May 2016) | 1 line

deleted 22.txt
————————————————————————
r4 | hl | 2016-05-28 09:01:30 -0700 (Sat, 28 May 2016) | 1 line

added version2 for 22.txt
————————————————————————
r3 | hl | 2016-05-28 08:18:23 -0700 (Sat, 28 May 2016) | 1 line

create 22 for gg
————————————————————————

相关推荐
python开发_常用的python模块及安装方法
adodb:我们领导推荐的数据库连接组件bsddb3:BerkeleyDB的连接组件Cheetah-1.0:我比较喜欢这个版本的cheeta…
日期:2022-11-24 点赞:878 阅读:9,115
Educational Codeforces Round 11 C. Hard Process 二分
C. Hard Process题目连接:http://www.codeforces.com/contest/660/problem/CDes…
日期:2022-11-24 点赞:807 阅读:5,587
下载Ubuntn 17.04 内核源代码
zengkefu@server1:/usr/src$ uname -aLinux server1 4.10.0-19-generic #21…
日期:2022-11-24 点赞:569 阅读:6,433
可用Active Desktop Calendar V7.86 注册码序列号
可用Active Desktop Calendar V7.86 注册码序列号Name: www.greendown.cn Code: &nb…
日期:2022-11-24 点赞:733 阅读:6,204
Android调用系统相机、自定义相机、处理大图片
Android调用系统相机和自定义相机实例本博文主要是介绍了android上使用相机进行拍照并显示的两种方式,并且由于涉及到要把拍到的照片显…
日期:2022-11-24 点赞:512 阅读:7,840
Struts的使用
一、Struts2的获取  Struts的官方网站为:http://struts.apache.org/  下载完Struts2的jar包,…
日期:2022-11-24 点赞:671 阅读:4,925