歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
Linux教程網 >> Linux基礎 >> Linux教程 >> Linux下使用一些常用的svn命令

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

日期:2017/2/28 16:21:53   编辑:Linux教程

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.

Copyright © Linux教程網 All Rights Reserved