The iOS Classic explains the SVN common terminal commands

Source: Internet
Author: User
Tags diff mkdir prev svn svn update

Author: Lin Nuo Lin

Reprint please indicate the source: http://blog.csdn.net/loving_ios/article/details/785381501, checkout the file to the local directorySVN checkout Path (path is a directory on the server)
For example: SVN checkout Svn://192.168.1.1/pro/domain
Shorthand: SVN Co2, add new files to the version librarySVN Add File
For example: SVN add test.php (add test.php)
SVN add *.php (Add all php files under current directory)3, the change of the file submitted to the version of the librarySVN commit-m "LogMessage" [-n] [--no-unlock] PATH (use the--no-unlock switch if you choose to keep the lock)
For example: SVN commit-m "Add test file for my test" test.php
Shorthand: svn ci4, lock/unlockSVN lock-m "Lockmessage" [--force] PATH
For example: SVN lock-m "lock test File" test.php
SVN unlock PATH5. Update to a versionSVN update-r m path
For example:
SVN update If there is no directory behind it, the current directory and all files under the subdirectory are updated to the latest version by default.
SVN update-r test.php (restores the file test.php in the version library to version 200)
SVN update test.php (update, sync with version library). 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 status1 SVN status Path (the state of the files and subdirectories under the directory, not shown in the normal state)
"?: not in the control of SVN; M: Content modified; C: conflict; A: scheduled to join repository; K: Locked
2 svn status-v path (displaying file and subdirectory status)
The first column remains the same, the second column displays the working version number, and the third and fourth columns display the last modified version number and the modified person.
Note: SVN status, SVN diff, and SVN revert these three commands can also be performed without a network, because SVN is local. SVN retains the original copy of the local version.
Shorthand: SVN St7, delete the fileSVN delete path-m "Delete test Fle"
For example: SVN delete svn://192.168.1.1/pro/domain/test.php-m "Delete test file"
Or simply svn delete test.php and then svn ci-m ' delete test file ', recommend using this
Shorthand: SVN (del, remove, RM)8, view the logSVN log path
For example: SVN log test.php shows all the changes to this file, and its version number9. View File DetailsSVN info Path
For example: SVN info test.php10, compare the differenceSVN diff path (compares the modified file to the base version)
For example: SVN diff test.php
SVN diff-r m:n Path (diff for version M and version N)
For example: SVN diff-r 200:201 test.php
Shorthand: SVN di11. Merge the differences between the two versions into the current fileSVN merge-r m:n Path
For example, SVN merge-r 200:205 test.php (merges the differences between version 200 and 205 into the current file, but generally conflicts and needs to be addressed)12, SVN helpSVN help
SVN help CI13, File and directory list under the version librarySVN list Path
Show all files and directories that belong to the version library under the path directory
Shorthand: SVN ls14. Create a new directory under version controlSVN mkdir: Create a new directory under version control.
Usage: 1, mkdir PATH ...
2, mkdir URL ...
Create a directory for version control.
1. Each directory specified in the working copy PATH will be created on the local side and added
Schedule to be submitted for the next time.
2. Each directory specified as a URL will be created by submitting it immediately to the warehouse.
In both cases, all intermediate directories must exist beforehand.15. Restore Local ModificationsSVN revert: Restores the original unchanged working copy file (restores most of the local modifications). Revert
Usage: revert PATH ...
Note: The notebook command does not access the network and will remove the conflicting status. But it won't recover.
The deleted directory16. Code Base URL ChangeSVN switch (SW): Updates 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 and "SVN update" is similar, will also
The file on the server is merged with the local file. This corresponds to a branch or tag in the same warehouse where the working copy is
Method.
2, rewrite the working copy of the URL metadata to reflect the simple URL changes. When the root URL of the warehouse changes
(for example, schema name or host name change), but the working copy is still mapped to the same directory in the same warehouse.
This command updates the working copy's correspondence with the warehouse.17. Conflict ResolutionSVN resolved: Removes the conflicting state of a working copy's directory or file.
Usage: Resolved PATH ...
Note: The notebook command does not resolve the conflict according to syntax or remove the conflict token; it simply removes the conflicting
Related files, and then allow PATH to be submitted again. 18, output the contents of the specified file or URL. SVN cat Target [@ VERSION] ... If a version is specified, the lookup is started from the specified version.

SVN cat-r PREV filename > filename (PREV is the previous version, can also write specific version number, so that the output can be submitted) 19, delete svn control.

First, RM-RF. SVN (not recommended)

Second, in the terminal operation: (recommended)

1, enter the corresponding project engineering directory CD/USERS/XXX/DESKTOP/XXX

2. Perform find delete operations

Find. -type d-name ". SVN" | xargs-i {} echo \ ' {}\ ' | Xargs RM-RF

Do not find directly. -type d-name ". SVN" | Xargs RM-RF

You're going to regret this.

3, delete the project in the original. svn file information, you can delete to the SVN server.

Related Article

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.