SVN client Common commands

Source: Internet
Author: User
Tags svn client svn update

1. Checkout files to a local directory

SVN checkout Path (path is a directory on the server)

For example:

Cd/home/www #进入准备获取的项目路径

SVN checkout svn://192.168.1.126/project-tbkt #chechout指定项目 while creating Project-tbkt folder

SVN checkout svn://192.168.1.126/project-tbkt new-name #指定文件名

If the Svn:error converting entry in directory ' tbkt ' to UTF-8 error occurs because the specified item contains garbled files, it can be deleted.

2. Update to the latest version

SVN update-r m path
For example:
The SVN update #如果后面没有目录, by default, updates all files in the current directory and subdirectories to the latest version.
SVN update-r test.html # (Restore the file test.html in the repository to version 200)
SVN update test.html (updated, sync in 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)

SVN resolved filename # Resolving conflicts

svn revert # Discard your changes

Shorthand: SVN up

3. Add a new file to the repository
SVN Add File
Example: SVN add test.html (add test.html)
SVN add *.html (add all HTML files in the current directory)

4. View file status

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 Repository; K: Locked"

Example: SVN status-q #查看哪些文件有改动

5.SVN replacing IP Address

Go to working directory

[Email protected] ~]# cd/home/www/project-tbkt/

[[Email protected] project-tbkt]# SVN info

Path:.

Url:svn://192.168.0.123/project-tbkt

Version Coogan: Svn://192.168.0.123/project-tbkt

Version Library Uuid:3b424fa4-6f94-45d2-ae27-6b31a2683abb

Version: 208

Node Type: directory

Dispatch: Normal

Last modified by the author: cl

Last modified version: 208

Last modified time: 2013-08-16 09:25:32 +0800 (five, 2013-08-16)

SVN switch--relocate http://oldPath http://newpath

Example: SVN switch--relocate svn://192.168.0.123/project-tbkt https://192.168.0.126/project-tbkt

6. Submission of documents

SVN commit-m "LogMessage" [-n] [--no-unlock] PATH (use –no-unlock switch if hold lock is selected)

Example: SVN commit-m "Add test file for my test" test.py

SVN commit-m "Commit" # does not follow the path after all files are submitted, including new files

For more settings please refer to:

Http://tortoisesvn.net/docs/release/TortoiseSVN_zh_CN/index.html

http://svndoc.iusesvn.com/svnbook/1.4/

SVN client Common commands

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.