1. Download the required program from the official website
http://tortoisesvn.net/downloads.html
2. Install the client
-
Install TortoiseSVN according to the method of installing general software. After successful installation, right-click anywhere, and the pop-up menu is as follows:
3. Create a repository (Repository)
Create a folder svn under the F drive, this folder is used to save all your The established database creates a subfolder SampleRepository under svn, and then creates a database in SampleRepository for our example. The
creation method
is: Right-click under SampleRepository, select TortoiseSVN -> Create Repository here...
Then select Native filesystem (FSFS )
After the successful creation, the directory structure is shown in the figure below. Do not easily change the contents of this folder. 4. Import (import...) the directory structure of the project data. This step is to let the database established above understand the directory structure of the project data. Create a sample project folder Sample under svn, namely C:\ProjectSVN\Sample Create three subfolders under Sample tags, trunk, branches Right-click under Sample and select import...
In this way, you can import the file directory structure of your project into the database . Fill in file:///
F:\svn /SampleRepository
in the URL of Repsitory , note that file: is followed by three /// 5. Configure users and permissions Go to
F:\svn \Sample\conf under the database you just created , and modify svnserve.conf
# [general]
Change it to:
# password-db = passwd
[general]
Then modify the passwd file in the same directory
password-db = passwd
# [users]
Change it to
# harry = harryssecret
# sally = sallyssecret
[users]
harry = harryssecret
sally = sallyssecret
where the left side is the username and the right side is the password
If you want to add a new username and password, you can create it in a new line, such as: username = password 6. Start the service
When Subversion is successfully installed, it has been added to the path, so open and run cmd below, and enter the following command to start the Subversion service, so that the client can access it.
Adding F:\svn at the end of the command is to tell svn our Where are the databases placed, plus this is very important, otherwise the client may report an error that the database cannot be found
7. In point 6, the command line must be opened, the service can be opened, and the client can be connected. Below we use the service as a self-starting service:
cmd into the system32 directory: type:
sc create svnserve binPath= "\"C:\Program Files\TortoiseSVN\bin\svnserve.exe\" --service --root F:\svn" displayname= "svnserve" depend= Tcpip start= auto
A successful message is prompted to be considered successful, and the service can be started.
If the service is not started, an error will be reported:
TortoiseSVN: Unable to connect because the target machine actively refused
client
- Install TortoiseSVN first
- In the client's project folder, right-click and select SVN CheckOut...
This will checkout the data from the server.
If you access a database with a password, you will also be asked to enter a username and password.