[Reprint]linux under SVN common instructions

Source: Internet
Author: User
Tags diff svn svn update tortoisesvn

Windows TortoiseSVN is a plugin to the explorer, to overwrite the icon indicates the status of the file, almost so the command has a graphical interface support, relatively easy to use, there is not much to say. The main talk about the use of SVN under the Linux, because most of the operation of Linux under the command line, so you have to master the Linux under the Common command of SVN.    Of course, Linux also has imitation tortoisesvn Linux x programs, such as Rabbitvcs, imitation is very high, but it is easy to slow down x, so it is not recommended. (If the file is submitted for the first time, it is likely that "SVN:'.'Not a working copy, that is, the current directory is not a working copy, this time you need to use the IMPORT:EG:SVN import. URL)1, checkout files to the local directory svn checkout path (path is a directory on the server) for example: SVN checkout svn://192.168.1.1/pro/domainshorthand: SVN co2, add a new file to the Repository svn addfileExample: SVN add test.php (add test.php) SVN add*. PHP (Add all the 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 –no-unlock switch) Example: SVN commit-M "Add testfile  formy Test "test.php shorthand: svn ci4LockingUnlock svn lock-M "Lockmessage" [--Force ] Path Example: SVN lock-M "Lock testfile"TEST.PHPSVN unlock PATH5, update to a version of 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-R $test.php (Restore the files in the repository to version test.php) SVN update test.php (update, sync to 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 the repository; K: Locked "M state is generally more2) 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 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 file svn delete path-m "Delete test Fle" For example: SVN delete svn://192.168.1.1/pro/domain/test.php-m "Delete test file"Or just svn delete test.php and then svn ci-m ' Delete testfile' It is recommended to use this shorthand: SVN (del, remove,RM)8, view Log svn log path for example: SVN log test.php shows all the changes to this file and its version number9, view file details svnInfoPath Example: SVNInfotest.phpTen, compare differences svndiffpath (compares the modified file to the underlying version) For example: SVNdiffTEST.PHPSVNdiff-r m:n Path (difference between version m and version N) For example: SVNdiff-R $:201test.php shorthand: svn di One, merge the differences between the two versions into the current file svn merge-r m:n Path Example: SVN merge-R $:205test.php (The difference between version 200 and 205 is merged into the current file, but there is a general conflict that needs to be addressed) A, SVN helps svn helpsvn help CI —————————————————————————— above is a common command, write below a few common —————————————————————————— -, repository file and directory list SVN list path displays all files and directories belonging to the repository in the path directory shorthand: SVNls -, create a new directory under version control SVNmkdir: Create a new directory under the included version control. Usage:1、mkdirPATH ...2、mkdirURL ... Create a version-controlled directory. 1, each directory specified in the working copy PATH is created on the local side and added to the new schedule to be submitted for the next time. 2, each directory specified in the URL is created by submitting it to the repository immediately. In both cases, all intermediate directories must exist beforehand.  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 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 that behaves like SVN update, and merges the file on the server with the local file.  This is the method that corresponds a working copy to a branch or tag in the same warehouse. 2, overwriting the URL metadata of the working copy to reflect changes on the simple URL. When the repository's root URL changes (such as scheme name or hostname change), but the working copy is still mapped to the same directory as the same repository, use this command to update the corresponding relationship between the working copy and the warehouse.  -, 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.  -, outputs the contents of the specified file or URL. SVNCattarget [@ VERSION] ... If a version is specified, the lookup starts from the specified version. SVNCat-r PREV filename > filename (PREV is a previous version, you can also write a specific version number so that the output can be submitted)

[Reprint]linux under SVN common instructions

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.