svn add values/strings.xml //--Add
svn st //--View status
svn ci //--Submit svn ci -m "svn ci, permission"
1. Checkout the file to Local directory
svn checkout path (path is the directory on the server)
For example: svn checkout svn: // 192.168 . 1.1 / pro / domain
Abbreviation: svn co
2. Add new files to the repository
svn add file
For example: svn add test.php (add test.php) svn add * .php (add all php files in the current directory)
For example: svn commit -m " add test file for my test " test.php C Brief as: SVN CI写4, lock/unlock
SVN LOCK -M "LockMessage" [ -FORCE] PATH
SVN UNLOCK PATH
5555555 , Update to a certain version
svn update -r m path
svn update If there is no directory after it, all files in the current directory and subdirectories will be updated to the latest version by default.
svn update -r 200 test.php (Restore the file test.php in the repository to version 200) svn update test.php (Update, synchronize with the repository. If it is prompted to expire when submitting, it is because of a conflict , you need to update and modify the file first, then clear svn resolved, and finally submit commit)
Abbreviation: svn up
6. Check the file or directory status
1) svn status path (the status of files and subdirectories in the directory, normal The status is not displayed)
2) svn status -v path (displays files and subtitles Directory status)
The first column remains the same, the second column shows the working version number, and the third and fourth columns show the last modified version number and the person who modified it. Note: The three commands svn status, svn diff and svn revert can also be executed without a network. The reason is that svn retains the original copy of the local version in the local .svn.
Abbreviation: svn st
7. Delete files
svn delete path -m "delete test fle"
Or directly svn delete test.php and then svn ci -m 'delete test file', it is recommended to use this
abbreviation: svn (del, remove, rm)
8. Check the log
svn log path
svn info path
svn diff path (Compare the modified file with the base version)
svn diff -r m:n path (Compare the difference between version m and version n)
For example: svn diff -r 200:201 test.php Abbreviation: svn di
11. Merge the differences between the two versions into the current file
svn merge -r m:n path
svn help
The above are commonly used commands, here are some less frequently used ones
--------------------- -------------------------------------------------- ------- Come
13. List of files and directories under the repository
svn list path
Display all files and directories belonging to the repository under the path directoryAbbreviation: svn ls
14. Create and include New directory under version control
svn mkdir : Create a new directory under version control.
Usage: 1. mkdir PATH...
2. mkdir URL...
Create a version-controlled directory.
1. Each directory specified by the working copy PATH will be created locally, and a new
schedule will be added to wait for the next submission.
2. Each directory specified by URL will be created in the warehouse through immediate submission.
In both cases, all intermediate directories must exist beforehand.
15. Restore local modifications
svn revert: Restore the original unchanged working copy file (restore most local modifications). revert:
Usage: revert PATH...
Note: This subcommand will not access the network and will resolve the conflict. But it will not restore the deleted directory
Usage: 1. switch URL [PATH]
2. switch --relocate FROM TO [PATH...]
2. Rewrite the URL metadata of the working copy to reflect the simple changes in the URL. When the root URL of the warehouse changes
(such as the solution name or host name changes), but the working copy is still mapped to the same directory in the same warehouse, use
This command to update the corresponding relationship between the working copy and the warehouse.
Usage: resolved PATH...
Note: This subcommand does not resolve conflicts or remove conflict markers based on syntax; it only removes the conflicting related files, and then allows PATH to be submitted again.