How to Use the svn client in Linux

Source: Internet
Author: User
Tags svn client svn update
I. SVN Introduction

SVN repository address introduction:
Https: the protocol is a network protocol built by the SSL + HTTP protocol for encrypted transmission and identity authentication.
Server IP Address
For example, ylqzqf: Repository name
  
Ii. SVN function description 1. Check out)

Function: Extracts existing files from the svn repository.
Command Line Operation:
Create a local workspace and an empty folder
$> Mkdir filename
Run the command SVN checkout path (path is the svn repository address) in the new folder (abbreviated as SVN Co), for example:

2. Submit (COMMIT)

Function: Submit the modified files or newly added files in the work copy to the server for the modification to take effect. After the modification is submitted, others can obtain the modifications you have made.
Command Line Operation:
Submit the modified files in the version control list
Command: SVN commit-M "log information" file to be submitted (abbreviated as svn ci)
$> SVN commit-M "log information" File
Add new files to the svn Library
First, add the file to the version control list. Command: SVN add File
$> SVN add File
Then "SVN commit"
3. delete a file (SVN delete)

Function: delete files submitted by mistake or unnecessary.
Command Line Operation:
Command: SVN Delete path-M "Reason for deletion"
$> SVN Delete http: //-M "Reason for deletion"
Then, the local SVN Update file will be deleted.
4. Update)

Function: obtains modifications made to files by other users and merges them with the modifications made to ensure that local files are always up-to-date.
Command Line Operation:
Update to the latest version by default.
Command: SVN Update file (abbreviated as SVN up)
$> SVN Update file
Update to specified version
$> SVN Update-r m file
5. view the log (SVN log)

Function: view the history of a directory or file.
Command Line Operation:
Command: SVN Log File
$> SVN Log File
6. Compare files (SVN diff)

Function: Compares the changes of a file in the svn database in different versions.
Command Line Operation:
□Command: SVN diff File
$> SVN diff-r m: N file. c
(M and n are the version numbers)
7. SVN restore and rollback (SVN revert/SVN merge)

Function: SVN revertIn the work copyAdded or modified files not submitted;
SVN mergeSubmitting SVN LibraryTo the specified version.
Command Line Operation:
SVN restore:
Command: SVN revert File
$> SVN revert file (directory or file to be restored)
Rollback, which must be rolled back by merging
Command: SVN merge-r m: N path
$> SVN merge-r m: N path (directory or file to be rolled back)
(Roll back from M version to N Version)
Then submit (SVN commit)
8. Relocate)

Function: After the svn server address is changed, it points to the new svn url.
Command Line Operation:
Command: SVN switch -- relocate original SVN repository address new SVN repository address
$> SVN switch -- relocate original SVN repository address new SVN repository address
9. Other skills

1. Export (export): use this function to obtainNo working copy of SVN control informationThe exported file does not have a. SVN file,Cannot be submitted directly
2. Import: Import local files to the server,It is generally used for initial SVN library directory
3. SVN cleanup: When the Subversion operation is interrupted, some residual operation information is retained in the work copy. In this case, the Subversion operation must be cleared before it can be restarted;
4. view the file or directory status (SVN status): Check the status of files and subdirectories in a directory in the working copy. [The normal status is not displayed ;? :Not under SVN control; M: The content is modified; C: A conflict occurs; A: It is scheduled to be added to the version Library; K: it is locked]

Iii. SVN usage specification 1. Log writing Specification

The log content must contain more than 10 characters, that is, more than 5 Chinese characters;
The log content must reflect the operation content, for example, adding the ** function/fixing ** problem/deletion ** Function
Submission frequency
Required to be submitted once after compilation is passed

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.