SVN command in Mac

Source: Internet
Author: User
Reprinted: SVN command in Mac 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): immediately submit a work copy to the address (URL)-> Work copy: Check out the address (URL) to the Work directory, add the address (URL)-> address (URL) through scheduling: complete server-side replication; 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, in the previous version, the svn CP-r19 $ URL/filename-check result svnstatus-submit SVN ci-M "resurrected c.txt fromr19" SVN merge-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, and finally submit $ SVN ci-M "merged br_1_0 to trunk" Code Roll back and undo 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 switch $ 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 Fi files in the local work copy. Lename. 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 unversionized files, 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.