MAC Learning Series SVN environment configuration and common commands Daquan

Source: Internet
Author: User
Tags diff prev svn update

Windows with SVN is more convenient and easy, the Mac is actually the same.
The Mac comes with SVN so it only needs to activate it – environment configuration:
Svnadmin Create $Path
To download an SVN program
After downloading, you can download the code.
The following is the SVN Common Command encyclopedia:

??1, checkout files to the local directory svn checkout path (path is a directory on the server) for example: SVN checkouthttp://xxxxxxxxxxxx Shorthand: SVN co2, add a new file to the repository svnAdd fileExample: SVNAddtest.php--(add test.php)SvnAdd*.php (Add all php files in the current directory)3, commit the changed files to the repository svn commit-m"LogMessage"[-N] [--no-unlock] PATH (use--no-unlock switch if hold lock is selected)Example: SVN commit-m"Add test file for my test"test.php shorthand: svn ci4, locking/Unlock svn lock-m"Lockmessage"[--force] PATHExample: SVN lock-m"Lock test File"test.php svn unlock PATH5, update to a version of SVN update-r m path for example: SVN update if there is no directory, the default is to update all files in the current directory and subdirectories to the latest version. SVN update-r $test.php (Restore a file from the repository to a test.php version $SVN update test.php (updated, synchronized in the 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 up6, view file or directory status1SVN 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"2SVN 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 modifier.   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 St7, delete files svnDeletePath-m"Delete Test fle"Example: SVNDeletesvn://192.168. 1. 1/pro/domain/test.php-m"Delete test file"or direct SVN.Deletetest.php and then SVN ci-m' Delete test file ', it is recommended to use this shorthand: SVN (del, remove, RM)8, view Log svnLogPath Example: SVNLogTest.php shows all changes to this file, and its version number9, view file details SVN info path example: SVN info test.phpTen, Compare the Difference svn diff path (compare the modified file to the base version) for example: SVN diff test.php svn diff-r m:n Path (difference between version m and version N) For example: SVN diff-r $:201test.php shorthand: SVN di One, merge the differences between the two versions into the current file svnMerge-R m:n Path Example: SVNMerge-R $:205test.php (The version $And205The differences between the files are merged into the current file, but generally there are conflicts that need to be addressed. A, SVN helps SVN help SVN------------------------------------------------------------------------------The above is a common command, the following write a few common------------------------------------------------------------------------------  -, repository list of files and directories SVN list path displays all files and directories belonging to the repository in the path directory shorthand: SVN ls -, create a new directory under version control SVN mkdir: Create a new directory under the included version control. Usage:1, mkdir PATH ...2MkdirURL... the, revert locally modified 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 does not restore the deleted directory -, code baseURLChange SVNSwitch(SW): Update the working copy to a differentURL。 Usage:1、Switch URL[PATH]2、Switch --relocate from to [PATH ...]          1, update your working copy, map to a newURL, it behaves like SVN update, and it merges the files on the server with the local files. This is the method that corresponds a working copy to a branch or tag in the same warehouse.2, overwriting the working copyURLMetadata to reflect the simpleURLChange on the other. When the root of the warehouseURLChanges (such as scheme names or host name changes), but the working copy still uses this command to update the corresponding relationship between the working copy and the warehouse when the same directory is mapped to the same repository. -, resolve conflict SVN resolved: Remove the "conflicting" status of the working copy of the 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 allows PATH to commit again. -, output the specified file orURLThe content. SVN cat Target [@ 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)

Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.

MAC Learning Series SVN environment configuration and common commands Daquan

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.