This blog is based on SVNbucket official video learning and production, here is the record of my operation
Video link: https://www.bilibili.com/video/BV1k4411m7mP?vd_source=a4c65e14d1ff11ea858cadc164fbb59e
1. Introduction to SVN
1. What is SVN
You can know from the information that this is an open source version control system, which manages data that changes over time, and is a tool for synchronizing different versions of documents and source codes between multiple personnel and devices.
view all modification history
Can restore to any historical version
recover deleted files
2. Comparison between svn and Git
Everyone has their own learning habits and different hobbies. Some people like git, some people like svn, but most companies use svn.
Git is distributed, svn is centralized
Git is distributed, so it supports offline work, many operations can be performed locally, and it has branch functions
svn must be online to work properly
Git has complex concepts and commands, svn is simple and easy to use
Git has local branches, svn has no local branches
In the actual development process, Git can be used to create branches when the code is not finished writing and dealing with other things, and the speed of switching branches is very fast.
3. Main application scenarios of svn
Version management for code used by developers
Used to store some important documents, such as contracts
File sharing within the company, and permissions can be divided by directory
4. svn repository
Recommended: svnbucket.com, svn bucket
The best svn service now
5. Install the svn client
TortoiseSVN (for Windows installations)
Cornstone (for Mac installation)
2. Windows download and install SVN client
Official website address: https://svnbucket.com/
1. Click to register now
When this screen pops up, the registration is successful and you can start using it
2. For the tutorial of getting started with svn, click Use Help
See the picture below, click on the svn quick start tutorial
This is the official document you can look at
3. Download the svn client, click Help, find the svn client download and click to enter the download interface
Enter the download interface, and then click the official website to download
You can also directly visit the download address on the official website, hahaha why didn't I say it earlier because I said it in detail
https://tortoisesvn.net/downloads.html
After entering the official website interface, select the version to download and install the latest version, select 64-bit
Scroll down to download the Chinese language pack, so that you can read and understand
Jump to the interface below, you can ignore it
4. Install, open the installation package folder you downloaded, double-click to install
Install after double-clicking to install
click next
click next
Click to change the installation path, or you can not change it, then click next
Click Install and wait for the installation to complete
The following appears, click OK
After the download is complete, click finsh.
3. Check whether the installation is successful
Go to a project folder, or an empty folder, and then right-click the mouse to display the following operations. The following appearance means that the installation is complete
, but this is required for English, so install the Chinese language pack downloaded above, double-click to install
Just click Next to complete the installation
Remember to tick,
Remember to tick,
Remember to tick,
and click done!!!
Check whether the Sinicization is successful, the following screen appears and the installation is successful
All downloads and installations have been completed here!!!
4. Using svn, basic commands
-
Install SVN client: You can download the corresponding SVN client from the official website, and execute the svn command on the command line after installation to use SVN.
-
Create a version library: Use the svnadmin create command to create a version library, either locally or remotely. The remote repository is generally accessed through svnserve.
-
Check out the code: Use the svn checkout command to copy the code from the repository to the local working directory.
-
Add/Delete Files: Use the svn add and svn delete commands to add or delete files.
-
Commit code: Use the svn commit command to submit local changes to the repository. Before submitting, you need to use the svn update command to merge the changes in the repository into the local code.
-
Update code: Use the svn update command to update the latest code in the repository to the local working directory.
-
View modification records: Use the svn log command to view modification records in the repository. You can also use the svn diff command to compare code changes.
-
Branching and merging: Use the svn branch command to create a branch, and use the svn merge command to merge the changes in the branch into the trunk.
done!!!