Version control is the art of managing changes to information. It has always been a programmer's most important tool. Programmers often spend time making small changes and then cancel those changes one day. Imagine a team of developers working in parallel - Maybe working on the same file at the same time! - and you'll understand why a good system needs to manage potential chaos.
svn (subversion) is a version management tool that has emerged in recent years and is the successor of cvs. Currently, the vast majority of open source software uses svn as code version management software.
How to use:
Create a new folder: E:TortoiseSVN
TortoiseSVN will create a repository in this folder, and a prompt box will pop up. Click "Create Directory Structure" and then start the repository browser to see the directory structure of the repository.
By clicking "Create Directory Structure", TortoiseSVN automatically creates 3 folders, branches, tags, trunk,
trunk directory
The trunk directory is generally used for code development. This directory should store the latest code.
tags directory
The version mark of the code. The code in this directory is not allowed to be changed. For example, if the software is released with version 1.0, a copy of the code of version 1.0 needs to be placed in tags. If 2.0 is released, a 2.0 must be marked in the tag. If there is a bug in the 1.0 software, the developer needs to verify the bug and just take the code of the 1.0 version directly from the tag without confusing different versions.
branches directory
Branch directory, used to develop new features or solve bugs in old versions. For example, version 1.0 is online, and developers are fully committed to the development of version 2.0. However, a bug suddenly appears in version 1.0 and must be fixed. It is urgent and cannot wait until version 2.0 is online. What should we do at this time? The correct approach is to take the 1.0 version code from the tag and create a new branch. The developer will solve the bugs found in 1.0 on this branch. After the solution is completed and the test passes, a new version mark is added to the tag, such as 1.1, and then close this branch. If bugs appear again in 1.1, then branch from 1.1, and so on, until 2.0 appears.
3. Add and check out items
Open the repository browser, right-click on the trunk directory, add the folder, and add a new project TestSVN.
Check out this project: right click-->SVN checkout
4. Create branches and tags
Select the project-->right-click-->copy to
On the project: right click-->Version branch diagram to view each version branch
it works
it works
it works