Instructions for using svn command lines in CentOS
0. View help
Command: svn help
1. Synchronize (checkout) server data to local
Command: svn checkout <url> [directory]
Svn co <url> [directory]
Example: Synchronize the https://svn.test.cn/book/network/ directory to the local/usr/local/svn/book/network directory
# Cd/usr/local/svn/book
# Svn checkout https://svn.test.cn/book/network/
...
(R) eject, accept (t) emporarily or accept (p) ermanently? T
...
Password for 'wandering ': <press enter> # wandering is the account of the current logon system.
Authentication realm: Username: jack
Password for 'jack': <password>
...
2. Submit (commit) Local documents to the server
Command: svn commit-m "" [directory | file]
Svn ci-m "" [directory | file]
For example, submit/usr/local/svn/book/network/tcpip.txt to the server, provided that the file already exists on the server.
# Cd/usr/local/svn/book/network/
# Svn commit-m "" #-m indicates the recorded log information, which can be empty.
Generally, you only need to execute svn ci-m "" in the directory where the data file to be updated is located.
3. update Server data to local
Command: svn update [directory | file]
Svn up [directory | file]
For example, update the content in the https://svn.test.cn/book/network/ directory to local
# Cd/usr/local/svn/book/network
# Cd update
4. View logs
Command: svn log [directory | file]
For example, view the modification log of the/usr/local/svn/book/network directory.
Method 1:
# Cd/usr/local/svn/book/network
# Svn log
Method 2:
# Svn log/usr/local/svn/book/network
5. add local data to the server
Command: svn add <directory | file>
Keywords (Tag): command use command line cmd svn