Use SVN command line tool

Source: Internet
Author: User
Tags svn update
Get the subversion for Windows from the http://subversion.tigris.org and install svn.exe, a command line-based client tool. Of course, there are also programs on the server side. Here we don't care how to configure the svn service. The installer adds the svn.exe path to the path environment variable. You can directly enter Svn in the command line to use it.


If you do not know how to use the svn command, you can query it as follows:
SVN help

If you know the sub-commands, but do not know the usage of the sub-commands, you can also query:
SVN help Ci

Common commands of developers


Import Project

SVN import http://svn.chinasvn.com: 82/pthread -- message "Start Project"


Export Project

SVN checkout http://svn.chinasvn.com: 82/pthread


Export a clean project using export

SVN export http://svn.chinasvn.com: 82/pthread


Clearing a failed transaction

SVN cleanup


Modify the code locally and check the modification status

SVN status-V

SVN diff


Update Server data to local

SVN update directory

SVN Update file


Add local data to the server

SVN add file. c

SVN add dir


Rename and delete an object

Svn mv B. C BB. c

Svn rm d. c


Submit (COMMIT) Local documents to the server

SVN commit

SVN Ci

SVN ci-M "commit"


View logs

SVN log directory

SVN Log File

Related things:

1. In a local file, each directory has a. SVN folder (the property is hidden), saving the relevant information.

2. register the environment variable svn_editor as "E: \ Program Files \ Vim \ vim71 \ gvim.exe". The following error occurs during svn ci:

'E: \ Program 'is neither an internal or external command nor a runable Program
Or batch files.
SVN: submission failed (details are as follows ):
SVN: System ('e: \ Program Files \ Vim \ vim71 \ gvim.exe svn-commit.tmp ') returns 1

Change svn_editor to "gvim.exe" and add the path "E: \ Program Files \ Vim \ vim71 \" to the path. In this way, you can use Vim to write comments during submission.

Appendix:

Websites that provide free SVN services:
Http://www.svnhost.cn/(recommended)
Http://www.chinasvn.com
Http://www.javaforge.com
Http://unfuddle.com
Http://svn.coollittlethings.com/index.php (free for open source and charged for private projects)

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.