SVN
learning record
Install
Server: https://www.visualsvn.com/downloads
Client: https://tortoisesvn.net/downloads.html
Server
client
Directly default to the next step, the language pack should be checked to configure SVN to this language.
Right-click to display the two options shown in the figure above, indicating that the installation is successful.
basic use
Create repository
Under the bin directory in the installation directory, there are the following files, double-click to open, and
the interface shown in the above figure will appear.
1. Right-click the repository Repositories to create a warehouse Create New Type, select the storage type, and select the file type FSFS in the figure below .
2. Fill in the repository name
3. Create an empty warehouse structure, and the second is a storage warehouse with a standard directory structure.
3. Select the permission, the default is fine, and it can be modified.
Create repository structure
Right-click the storage warehouse you created, create new -> Project Structure
The following directories will then be created under the created directory:
trunk (trunk | main branch): development in the main direction, when the development module is completed, switch to branche when modification is required.
tags (tags): Mark available versions.
Branches (branches): Usually used to fix bugs, test and add new features, and develop in parallel with the main line.
Add user
Right-click the Users folder create user to create a new user:
Set the user's permissions to the repository:
Right-click all tasks in the repository to be managed -> Manage Security
Remove EveryOne first, add the created user in Add, and Permissions is the one to be granted permission.
add group
Right-click Groups->Create Groups
to set the group name, and you can click Add to add group members. It is recommended to create a group and assign members separately, and then set the corresponding repository permissions to add the group.
common operation
Order | Function |
---|---|
checkout | Checkout: initial download - when connecting to the svn server for the first time, you need to download the data of the corresponding warehouse (if there is data in the warehouse), which can be abbreviated as co . |
add | Add new data to the svn server. |
update | Update data, check whether the data in the svn server is consistent with the local data, if not, download, add/change parts, and will not delete the local data. |
delete | delete svn data |
revert | Rollback, rollback the specified version of the code to the local, if you want to submit to the server, you need to use the commit command. |