Linux下使用一些常用的svn命令

本文介绍了SVN的基本操作,包括更新、下载源代码、添加新文件、删除文件及查看文件状态等常用命令,并解释了各个命令执行后可能出现的不同状态含义。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

1. 更新svn

svn up, 运行该命令后的状态有:

A Added
D Deleted
U Updated
C Conflict
G Merged

如果出现C的话,一定要自己解决冲突,否则的话提交不了;

手动解决掉冲突后,需要运行svn resolved命令,将冲突的

版本文件删除掉。

 

2. 第一次从svn server上下载source

svn checkout svn://ipaddress/your_repo

svn co svn://ipaddress/your_repo

svn checkout http(s)://ipaddress/your_repo

svn co http(s)://ipaddress/your_repo

 

3. 给svn追加新的文件

svn add yourfile

svn commit

 

4. 从svn删除文件

svn delete yourfile

svn commit

 

5. 本地文件的状态

svn status, 运行该命令后的状态有:

' '  No modifications.
'A'  Item is scheduled for Addition.
'D'  Item is scheduled for Deletion.
'M'  Item has been modified.
'R'  Item has been replaced in your working copy. This means the file was scheduled for deletion, and then a new file with the same name was scheduled for addition in its place.
'C'  The contents (as opposed to the properties) of the item conflict with updates received from the repository.
'X'  Item is related to an externals definition.
'I'  Item is being ignored (e.g. with the svn:ignore property).
'?'  Item is not under version control.
'!'  Item is missing (e.g. you moved or deleted it without using svn). This also indicates that a directory is incomplete (a checkout or update was interrupted).
'~'  Item is versioned as one kind of object (file, directory, link), but has been replaced by different kind of object.

 

参见:

http://www.linuxfromscratch.org/blfs/edguide/chapter03.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值