(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 the file to the local directory
SVN checkout path (path is a directory on the server)
Example: SVN checkout svn://192.168.1.1/pro/domain
Shorthand: SVN co
SVN add File
For example: SVN add test.php (add test.php)
SVN add *.php ( Add all the PHP files in the current directory)
svn commit-m "LogMessage" [-n] [--no-unlock] PATH (use –no-unlock switch if hold lock is selected)
For example: SVN commit-m "Add test file for my test" test.php
Shorthand: svn ci
4, locking/unlock
svn lo Ck-m "Lockmessage" [--force] PATH
Example: SVN lock-m "lock test File" test.php
svn unlock PATH
5, update to a version
SVN update-r m path
For example: < Span style= "color: #f00000;" >svn Update if there is no directory, the default updates all files in the current directory and subdirectories to the latest version.
SVN update-r test.php (Restore files from the repository test.php to version)
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 up
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-v path (display file and subdirectory status)
The first column remains the same, the second column displays the work version number, 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 the Local. SVN.
Abbreviated: SVN St
7, delete file
svn delete path-m "delete test fle" < Span style= "color: #f00000;" > example: SVN delete svn://192.168.1.1/pro/domain/ Test.php-m "Delete test file"
or directly svn delete test.php and then svn ci-m ' delete test file ', this is the recommended
shorthand: SVN (del, remove, R m)
8, view log
SVN log path
For example: SVN log test.php shows all the modified records of this file, and its version number changes
9, View file details
SVN info path
For example: SVN info test.php
10, compare diff
svn diff path (compare modified file to base version)
For example: SVN diff test.php
SVN diff-r m:n Path (difference between version m and version N)
Example: SVN diff-r 200:201 test.php
Shorthand: svn di
11, merging differences between two versions into the current file
svn me Rge-r m:n Path
For example: SVN merge-r 200:205 test.php (the difference between version 200 and 205 is merged into the current file, but generally span> < Span style= "color: #f00000;" > 12, svn help
SVN helper
svn assist CI
——————————————————————————
above is a common command, following a few of the usual
———— ——————————————————————
13, repository list of files and directories
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
SVN mkdir: Creates a new directory under the included version control.
Usage: 1, mkdir PATH ...
2, mkdir URL ... The
creates a version-controlled directory.
1, each directory specified in the working copy PATH, is created on the local side and added new Dispatch, to wait for the next commit.
2, each directory specified as a URL, is created by committing to the repository immediately.
In both cases, all intermediate directories must exist beforehand.
15, restore local modifications
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. However, it does not recover
deleted directories
16, code base URL changes
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, overwrite the URL metadata of the working copy to reflect the changes on the simple URL. When the root URL of the repository changes
(such as schema name or host name change), but the working copy is still mapped to the same directory as the same repository using the
command to update the working copy to the warehouse.
Note: The book command does not resolve the conflict by syntax or remove the conflict token; it simply removes the conflicting
File, and then allow PATH to submit again.
18. Output the contents of the specified file or URL.
SVN cat Target [@ VERSION] ... If a version is specified, the lookup starts 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 can be submitted)
SVN common commands under Linux