Use of the SVN command under Linux

Source: Internet
Author: User

use of the SVN command under Linux SVN software version management 12th, Reproduced this site article please specify, reproduced from: Fu Kai[[Url]http://www.php-oa.com[/url]] This article links:[Url]http://www.php-oa.com/2008/03/12/svnminglingzailinuxxiadeshiyong.html[/url] 1.Checkout files to a local directory svn checkout Path (path is a directory on the server)
Example: SVN checkout svn://192.168.1.1/pro/Domain
Shorthand: SVN co 2.Add a new file to a repository svn add file
Example: SVNAddtest.php (add test.php)
SVN add *.php (Add all php files in the current directory) 3.Commit the changed file to the repository SVN commit-M "LogMessage" [-n] [--no-unlock] PATH (if hold lock is selected, use the--no-unlock switch)
Example: SVN commit-m "Add test file for my test" test.php
Shorthand: svn ci 4.Locking/unlock SVN lock -M "Lockmessage" [--force]PATH
Example: SVN lock-m "lock test File"test.php
svn unlock PATH 5.Update to a version svn update-r m path
For example:
SVN update If there is no directory behind it, the default is to update all files in the current directory and subdirectories to the latest version.
SVN update-rtest.php (Restore the file test.php in the repository to version 200)
SVN update test.php (updated, sync in Repository.) If the prompt expires at the time of submission, it is because of the conflict, you need to update, modify the file , then clear the SVN resolved, and then commit the commit)
Shorthand: SVN up 6.View file or directory status1 SVN status path (status of files and subdirectories under directory, normal status not shown)
"?: not in SVN control; M: Content modified; C: conflict; A: Scheduled to be added to Repository; K: Locked"
2) svn status-v path (shows file and subdirectory status)
The first column remains the same, the second column shows the work version number, and the third and fourth columns show the last modified version number and the modified person.
Note: The SVN status, SVN diff, and SVN revert three commands can be executed without a network, because SVN retains the original copy of the local version in. svn.
Shorthand: SVN St 7.deleting files svn Delete path-m "Delete Test fle"
Example: SVN delete svn://192.168.1.1/pro/domain/test.php-m "Delete test file"
Or go directly to svn delete test.php and then svn ci-m ' delete test file ', which we recommend using this
Shorthand: SVN (del, remove, RM) 8.View Logs SVN log path
For example: SVN log test.php shows all changes to this file, and its version number 9.View file Details SVN Info path
Example: SVN info test.php 10.Compare differences svn diff Path (compares the modified file to the base version)
Example: SVN diff test.php
svn diff -R m:n Path (difference between version m and version N)
Example: SVN diff-r 200:201 test.php
Shorthand: SVN di 11.Merging differences between two versions into the current file svn merge-r m:n Path
For example: SVN merge-r 200:205 test.php (the difference between version 200 and 205 is merged into the current file, but generally conflicts occur and need to be addressed) 12.SVN Help   SVN Help
SVN help CI
------------------------------------------------------------------------------above are common commands, Here are a few of the most common------------------------------------------------------------------------------ 13.List of files and directories under the repository SVN list path
Displays all files and directories belonging to the repository under the path directory
Shorthand: SVN ls 14.To create a new catalog under the included version control SVN mkdir: Create a new directory under the included version control.
Usage: 1, mkdir PATH ...
2. mkdir URL ...
Create a version-controlled directory.
1. Each directory specified in the working copy PATH will be created on the local side and added
Scheduled to be submitted for the next time.
2. Each directory specified in the URL will be created by submitting it to the repository immediately.
In both cases, all intermediate directories must exist beforehand. 15.Restore Local modifications svn revert: Restores the original unchanged working copy file (restores most of the local modifications). Revert
Usage: revert PATH ...
Note: The notebook command will not access the network and will release the conflicting condition. But it won't recover.
Directories that were deleted 16.Code base URL Change SVN switch (SW):Update the working copy to a different URL.
Usage: 1, switch URL [PATH]
2. Switch--relocate from to [PATH ...] 1, update your working copy, map to a new URL, its behavior is similar to "SVN update", will also
The files on the server are merged with the local files. This is the one where the working copy corresponds to a branch or tag in the same warehouse.
Method.
2, rewrite the working copy of the URL metadata to reflect the simple URL changes. When the root URL of the warehouse changes
(such as scheme name or host name change), but the working copy is still used when mapping to the same directory in the same warehouse
This command updates the correspondence between the working copy and the warehouse. 17.Resolve Conflicts SVN resolved:Removes the "conflicting" status of the working Copy's directory or file.
Usage: Resolved PATH ...
Note: The book command does not resolve the conflict by syntax or remove the conflict token; it simply removes the conflicting
File, and then allow PATH to submit again. 18.Outputs the contents of the specified file or URL. SVN CatTarget [@ VERSION] ... If a version is specified, the lookup starts from the specified version.
SVN cat-r PREV filename > filename (PREV is the previous version, you can also write a specific version number, so that the output can be submitted) turn from: [url]http://hi.baidu.com/panzhiqi/blog/ Item/178d0fcaa47d2582c8176828.html[/url]

Use of the SVN command under Linux

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.