SVN version management tools common command line details

Source: Internet
Author: User
Tags svn update

1. Checkout the file to the local directory.
SVN checkout path (path is the directory on the server)
Abbreviation: SVN Co

2. Add new files to the version Library
SVN add File

3. Submit the modified file to the version library.
SVN commit-m "logmessage" [-N] [-- no-unlock] path (if the lock is selected, use the-no-Unlock switch)
Abbreviation: SVN Ci

4. Lock/unlock
SVN lock-m "lockmessage" [-- force] path
SVN unlock path

5. Update to a specific version.
SVN update-r m path
Abbreviation: SVN up

6. view the file or directory status
1) SVN status path (the State of the files and subdirectories under the directory. The normal state is not displayed)
2) SVN status-V path (displays the status of files and subdirectories)
Abbreviation: SVN St

7. delete an object
SVN Delete path-m "delete test FLE"
Abbreviation: SVN (Del, remove, RM)

8. View logs
SVN Log Path

9. View File details
SVN info path

10. Differences
SVN diff path (compare the modified file with the basic version)
SVN diff-r m: N path (differences between version m and version n)
Abbreviation: SVN di

11. Merge the differences between the two versions into the current file.
SVN merge-r m: N path

12. SVN help
SVN help
SVN help Ci

------------------------------------------------------------------------------
The above are common commands. Below are a few
------------------------------------------------------------------------------

13. List of files and directories in the version Library
SVN list path: displays all files and directories in the path directory that belong to the version library. Short for: SVN ls

14. Create a new directory under Version Control
SVN mkdir: Create a new directory under version control.
Usage:
1. mkdir path...
Each directory specified by the working copy path will be created on the local end and added to the new scheduling for the next submission.
2. Create a version control directory.
Each directory specified with a URL is created by submitting it to the repository immediately. In both cases, all the intermediate directories must exist in advance.

15. Restore local modification
SVN revert: restore the original unchanged working copy file (recover most local modifications ).
Usage: Revert path... note: sub-commands do not access the network and will remove the conflict. However, it does not restore the deleted directory.

16. code library URL change
SVN switch (SW): update the working copy to different URLs.
Usage:
1. Switch URL [path]
Update your work copy and map it to a new URL. The behavior is similar to "SVN Update", and the files on the server are merged with local files. This is a method that maps a work copy to a branch or tag in the same repository.

2. Switch -- relocate from to [path...]
Rewrite the URL metadata of the working copy to reflect the changes on the simple URL. When the root URL of the Repository changes (for example, the solution name or host name changes ), however, when the working copy is still mapped to the same directory in the same warehouse, use this command to update the correspondence between the working copy and the warehouse.

17. Conflict Resolution
SVN resolved: the "Conflict" Status of directories or files that remove working copies.
Usage: resolved path... note: the subscriber command does not resolve conflicts or remove the conflict mark according to the syntax. It only removes conflicting files and allows the path to be submitted again.

18. output the content of the specified file or URL.
If the svn cat target [@ version]... is specified, it will start from the specified version. SVN cat-r Prev FILENAME> filename (prev is the previous version, you can also write a specific version number, so that the output result can be submitted)

 

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.