SVN linux Command

Source: Internet
Author: User

1. Delete files in SVN repository directly--SVN delete path-m "Delete test Fle"

Example: SVN delete svn://10.1.1.227/bank/ld_sys/pubtags/v1.1.1/update/list/ld_sys.list-m "Delete the list file"

2. Delete the file locally and submit it to the SVN repository

Example: SVN delete gjw_sys; SVN ci-m "Delete"; (Note:svn delete removes the local directory without the-m comment content Note 2: shorthand svn (del, remove, RM)) recommends using this

3. Conflict resolution-Resolved PATH

Example: SVN resolved test.txt

4. Checkout files to a local directory-SVN checkout path (Note 1:path is a directory on the server )

Example: cd/home/sample/temp; SVN checkout Svn://10.1.1.227/bank/cv/fulltags/v1.0/app/cl_svn/clweb
Shorthand: SVN Co

5. Add new files to the repository-svn add File

Example: Touch test.php; SVN add test.php; SVN ci-m "Add test.php" (Note 1: you need to create a file locally first to incorporate version control NOTE 2: last commit operation for version synchronization )

6. Submit the changed file to the repository-svn commit-m "LogMessage"

Example: SVN ci-m "Modify log Content" Test.txt

7. Lock/Unlock operation-SVN lock-m "logmessage" path (svn unlock path)

Example: SVN lock-m "lock test File" test.php (svn unlock test.php) Note: unlock does not accept-m option

8. Update to a version-SVN update-r m path

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 the file test.php in the repository to version 200)
SVN update test.php (updated, sync in 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 up

9. View file or directory status-SVN status path (status of files and subdirectories under directory, normal status not shown)

Example: 1) SVN status test.txt Note: "?: not in SVN control; M: Content has been modified; C: conflict; A: Scheduled to be added to Repository; K: Locked "

2) SVN status-v path (show 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 modified person.
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 St

10. View Log-SVN log path shows all changes to this file and its version number

Example: SVN log test.php

11. View file Details-SVN info path

Example: SVN info test.php

12. Compare differences between versions- svn diff path (compare modified files to the base version)

-- SVN diff-r m:n Path (difference between version m and version N)

Example: SVN diff test.php

Example 2:SVN diff-r 4353:4363 test.txt
Shorthand: SVN di

13. Merge the differences between the two versions into the current file-svn merge-r m:n Path

Example: SVN merge-r 4363:4353 test.txt (the difference between version 4363 and 4353 is merged into the current file, but there is a general conflict that needs to be addressed )


14. Querying the list of files and directories under repository-SVN list path

Example: SVN list-r/home/sample/versionlocal
Abbreviated SVN ls

15. Restore local modifications, restore original unchanged working copy files (restore most local modifications)--svn revert path

Example: SVN revert test.txt (note: The book command will not access the network and will release the conflicting condition.) But it will not recover the deleted directory )
Example 2:SVN revert-r temp plus-r option to restore the directory

16. Resolving conflicts--SVN resolved path

Example: SVN resolved test.txt;

. SVN Help

Example: SVN help
SVN help CI (query for submission assistance)

SVN linux Command

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.