SVN common commands under Linux

Source: Internet
Author: User

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:" will appear.) Not a working copy, that is, the current directory is not a working copy, this time requires import:eg:svn import. url) 1. Checkout files to a local directory
svn Checkout Path (path is a directory on the server) for example: SVN checkout svn: // 192.168.1.1/pro/domain shorthand: SVN co

2. Add a new file to the repository



    1. \SVN Add *//Add all Files
    2. \SVN ci-m "description document" *

3. Submit the changed files to the repository

SVN commit-m "LogMessage" [-n] [--no-unlock] PATH (if hold lock is selected, use –no- for my test "test.php shorthand: SVN ci< /c4>

4. Locking/unlock

lock -M "Lockmessage" [- -lock-M "lock

5. Update to a version

SVN update-

6. View file or directory status

1 SVN 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 more 2) SVN status-

7. Delete Files

SVN Delete path-m "Delete test Fle" Example: SVN delete svn://192.168.1.1/pro/domain/test.php-m "Delete Test file " or direct svn delete test.php and then svn ci-m ' Delete test file ', recommended this shorthand: SVN (del, remove, RM)

8. View Logs

SVN log path For example: SVN log test.php shows all the changes to this file and its version number

9. View File Details

SVN info Path Example: SVN info test.php

10. Compare Differences

-£ º201

11. Merge the differences between the two versions into the current file

SVN merge-$:205 test.php (the difference between version 200 and 205 is merged into the current file, but generally conflicts occur and need to be addressed)

12. SVN Help

SVN helpsvn help CI

——————————————————————————

The above is a common command, the following write a few common
——————————————————————————
13. List of files and directories under the repository
SVN list Path

Displays all files and directories belonging to the repository under the path directory

Shorthand: SVN ls

14. Create a new directory under version control

1 , mkdir PATH ... 2 , mkdir URL ... Create a version-controlled directory.  1. Each directory specified in the working copy PATH will be created on the local side and added to the new schedule for the next commit.  2

15. Restore Local Modifications

16. Code base URL Change

Switch1,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. 

17. Conflict resolution

18. Output the contents of the specified file or URL.

-r PREV filename > filename (PREV is a previous version, you can also write a specific version number so that the output can be submitted)

SVN common commands under Linux

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.