Svn command in Mac

Source: Internet
Author: User

Svn help command to obtain sub-Commands description svn info $ URL view workspace information svn list displays the list of svn record files in the current directory, do not access version library svn list $ URL do not download to local View File svn log view version 5 to 19 history svn log view historical modification information of current directory svn log filename View view the historical modification information of a single file svn log $ URL view $ URL history information www.2cto.com svn diff compare local work copy changes svn diff-r 3 filename compare local work copy and version library specified version svn diff-r $ URL compares two versions of the version library locally (working copy) compared with the local version before modification, You can precisely view the modification content. The first row to be deleted-and the first row to be added + svn cat-r 2 filename displays the svn st $ DIR query of the specified version of the file. Check whether the local changes have been made before svn revert/ci. Run this operation to avoid incorrect output: m a d r? C * add or delete files that are not included in version control conflicts. check whether all files in the current directory are in the same svn status as the version library version, check svn status aa/a.txt to view the file information in the specified directory. svn status-v: all the files in the current directory, even if svn status-u has not been changed, * The system prompts you to update the svn co $ URL $ DIR [co = checkout] to check out the SVN library file to the local workspace svn export $ URL $ DIR [usually used during packaging] from the version. library to export a clean directory tree, same as svn co, but not including. svn directory www.2cto.com svn up [up = update] Output prompt: u a d r g c update add Delete replace merge conflict svn up update local workspace, by default, all files in the current directory and Its subdirectories are updated to the latest version s. Vn up filename update filename is the latest svn up-r 200 file. c-m "update the version to 200. c is restored to version 200 and submitted to the server, the version library is not changed. svn import $ DIR $ URL-m "comment information" [generate submit operation] import the directory under $ DIR to $ URL, instead of creating a directory under $ URL, copy the content under DIR to the URL. For example, there is a folder test/code. java svn import test $ URL/test-m "import a new file. when java is copied to the test folder of the version library, the local DIR does not change, and the local and server are not managed, you need to execute the checkout command to retrieve the server content before creating a working copy locally is equivalent to copying the local file to the version library. The source file has nothing to do with the version library file. Record svn import $ DIR $ URL/$ DIRsvn add file [local operation] add files or directories to the local machine. svn add test is submitted only when svn ci is used. c. Add the test directory and test. c file www.2cto.com svn delete file: delete the directory from the local work or URL, or remove the file svn del test. c. Delete the test directory and test. c. It is submitted only when svn ci is executed, and the version is added [Once svndel, local folders or files are deleted.] svn del $ URL-m "Del the dir for some reason" is generated and submitted, added svn mv $ URL/old $ URL/new-m "comment" [mv = move is equivalent to svn delete after svn cp] to move or copy files in the workspace or version Library/ directory can also be used to rename the svn mv f File Oo. cf. the c workspace file is renamed. When svn ci is used, the svn mv-m "Move a file" $ URL1 $ URL2 mobile file is submitted, generate svn rm $ URL/dir-m "comment" directory to delete svn ci-m "comment information" [ci = commit]. Note that after submission, the local svn list is still old. You need to manually svn up to obtain the latest svn revert filename. [local operations will cause loss of modifications. Use with caution] to restore modifications to files or directories, used to cancel local modification before the commit operation (ci) is executed. Svn rm filename, svn up-r BASE filenamesvn revert-R $ DIR restore workspace $ all changes under the DIR directory svn revert test. c. Restore test. c. Modify the svn mkdir $ URL/dir-m "comment" workspace or version library to create the svn mkdirnewdir local workspace to create the directory newdir, after svn ci is used, svn mkdir-m "Making a dir" $ URL/$ NEW_DIR is used to submit files between svn cp $ URL1 $ URL2-m "comment" working copies or version libraries. mutual copy origin (SRC)) and the purpose (DST) can be a work copy path or address (URL): Work copy-> Work copy: Copy and add through scheduling (including History) work copy-> address (URL): submit a copy of work to the address (URL)-> Work Copy: Check out the address (URL) to the working directory, add the address (URL)-> address (URL) through scheduling: complete server copy; it is generally used to copy local svn cp $ URL $ DIR files to the branch and label svn cp foo.txtbar.txt local file to add the $ URL directory locally, put the $ URL directory under $ DIR. svn cp $ URL1 $ URL2-m "comment" will generate the submission operation svn cp $ DIR $ URL-m "comment" to generate the submission operation. create a new branch svn co $ URL2, you can perform operations in the copy of the branch work. svn ci-m "fix bug 1031" is not found in the current version of the deleted project www.2cto.com, exists in the previous version-accurately copy svn cp-r19 $ URL/filename-check result svnstatus-submit svn ci-m "resurrected c.txt fromr19" svn mer Ge-r m: n path compares two version trees, apply the difference to local copy the final version tree of the initial version tree a copy of the work that receives the difference merge branch-find the version svn log-v -- stop-on-copy $ URL generated by the Branch to find the branch the generated version is r10-local copy of the working directory as the master node $ cd proj/trunk $ svn up to see the latest version, suppose r15-execute the merge $ svn merge-r $ URL-check the merge result, you may need to manually resolve the conflict, finally, commit $ svn ci-m "merged br_00000 to trunk" code rollback to cancel a submitted version. The modification is incorrect and should not be submitted, to roll back to the previous version, run the command $ svn merge-r 20:19 $ URL-check the copy result $ svn status-submit the copy result $ svn ci-m "undo change commited in r20 "svn switc H $ URL provides a shortcut to change the working copy, for example, the original copy is on the trunk, currently, you want to switch to the branch to work. $ svn switch $ the branch URL runs svn info | grep URL. You can see that the file tag url is the branch path svn resolved filename to delete the conflict tag. In svn up, prompt U (local file updated) G (merged successfully) there is no need to handle conflicts between the clocal and server modification, manual processing is required when a conflict occurs-C mark file-conflict file is planted with the conflict mark (<... =...>) -For each conflicting file, SVN generates three unversioned files and filename in the local work copy. the locally modified version filename of mine. rOLDREV the original filename that has not been modified since the last update. when the latest version of the rNEWREV server fails to run svn ci, You can manually resolve the conflict and open the conflict file according to the conflict mark (<... =...>) to modify a file, refer to the three unversioned documents. Parts, after the modification is complete, delete these tags-run svn resolved filename or manually delete three unversionized files-run svn ci-m "comment" Submit and modify www.2cto.com svn lock-m "LockMessage" [-force] PATH locking, lock the working copy path or URL of the version library, so no other user can submit modifications to these files. Changed the work copy. The version Library [accessed the version library] svn lock-m "lock test file" test. phpsvn unlock PATH unlock ============================= find. -name ". svn "| xargs rm-Rf clear svnsvn propset svn: ignore tmp. ignore the file If you want to ignore folder tmp ------------------------------------ towne

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.