【SVN】Using steps of the code version management tool and globally ignoring folders that do not need to be submitted

2023, week 36. Give yourself a goal, and then insist that there will always be a receipt, if you don’t believe me, try it!
SVN, short for Subversion, is an open source version control system used to manage code versions and file changes during software development.
It provides functions such as tracking file modification, collaborative development, version rollback, branching and merging, and helps team members share and manage project code.

1. Code management tools

After a brief arrangement, some common code management tools are more commonly used than git and svn
insert image description here

1、Git

Git is currently the most popular distributed version control system, with powerful branching and merging functions, suitable for personal development and team collaboration.

2、SVN(Subversion)

SVN is a centralized version control system that manages and coordinates the team's code versions through a central warehouse, and is suitable for small and medium-sized projects.

3、Mercurial

Mercurial is another distributed version control system that is similar to Git but differs in some details and workflow.

4、Perforce

Perforce is a commercial version control system widely used in large-scale software development projects, with a high degree of customizability and performance advantages.

5、Team Foundation Version Control(TFVC)

TFVC is Microsoft's centralized version control system, often used by teams using Visual Studio for development.

6、Apache Subversion(SVN)

The SVN version of the Apache project, offering more improvements and enhancements.

This is just a small sample of code management tools, and each tool has its own characteristics and applicable scenarios.
Choose the tools that work best for your project and team, making decisions based on job needs and team preferences.
According to the development team that the blogger has come into contact with, svn was used a lot before, and git started to be used more later.

Two, the difference between SVN and Git

SVN (Subversion) and Git are two commonly used version control systems with some important differences in how they are designed and used.
insert image description here

1. Distributed vs centralized

Git is a distributed version control system. Each local working copy is a complete code repository with complete history and version information. SVN is a centralized version control system. All code and version information are stored in the central warehouse, and developers need to access the central warehouse through a network connection.

2. Performance

Since Git is distributed, most operations can be done locally, so it is usually faster than SVN in terms of execution speed. Git uses a powerful branch merging algorithm and has efficient branching and merging functions, while SVN's branching and merging are relatively complicated.

3. Branch management

Git is very flexible in branch management, can easily create, switch and merge branches, and supports multi-level and parallel development. The SVN branch is relatively cumbersome in operation, requiring manual creation of branches and merging operations.

4. Historical records

Git keeps a complete code history, including a snapshot of each commit, which can more accurately track each modification, making it easy to view, roll back, and compare different versions. SVN only saves the differential patch of the file, and does not save the complete file snapshot.

5. Distributed development and collaboration

The distributed nature of Git allows team members to independently develop and submit locally, and only needs to synchronize with the central warehouse when needed. This approach is suitable for distributed teams and remote collaboration. SVN's centralized model requires developers to have more frequent dependencies on the central repository.

According to the specific needs and team situation, it is very important to choose the version control system that suits you.
Git has advantages in speed, branch management and distributed collaboration, while SVN excels in simplicity and centralized control.

3. Steps to use SVN

3.1. What is SVN

SVN, short for Subversion, is an open source version control system used to manage code versions and file changes during software development.
It provides functions such as tracking file modification, collaborative development, version rollback, branching and merging, and helps team members share and manage project code.

SVN uses the working mode of the centralized version control system (Centralized Version Control System, CVCS). In SVN, project code and historical versions are stored in the central warehouse (Repository).
Developers can check out the code from the warehouse (Checkout) to the local, modify the code, and then submit (Commit) to the warehouse. SVN will automatically track and record the changes for each commit, so it is easy to roll back to a previous version or compare the differences between different versions.

SVN also supports branch (Branches) and merge (Merge) operations, so that team members can develop on independent code branches and merge the modified code into the trunk (Trunk).
This avoids conflicts among team members and keeps the project code clean and stable.

SVN is a powerful, stable and reliable version control system, which is widely used in software development projects of various sizes.
It provides a variety of client tools and server programs, such as TortoiseSVN, VisualSVN, SVNKit, etc., and you can choose the appropriate tool to use according to your needs.

3.2. Steps to use

The general steps for version control using SVN are as follows

1) Install SVN client
First, you need to install SVN client software, such as TortoiseSVN, VisualSVN, SVN command line, etc. Choose the appropriate client tool based on your operating system and personal preferences.

2) Create or check out a working copy
Based on the existing SVN warehouse, you can choose to create a new working copy (Working Copy) or check out (Checkout) an existing working copy. By checking out a working copy, you copy a specific version of the SVN repository locally so that you can make changes locally.

3) Modify files
Perform code modification, add new files or delete files in the working copy. You can use your favorite code editor to modify files in your working copy.

4) Submit modification
When you finish modifying the file, select the file or folder to submit, and execute the submit operation. This will upload your changes to the SVN repository and record them as a new version.

5) Update the working copy
In order to keep in sync with the SVN warehouse, you should regularly update (Update) your working copy. The update operation will download the latest version and apply it to your working copy so that you can pick up other people's changes.

6) Branching and merging
SVN provides the functions of branching and merging, enabling teams to develop different functions or tasks in parallel. You can do independent development by creating branches and later merging changes from the branches into the trunk or into other branches.

7) Conflict resolution
In the process of multi-person collaborative development, code conflicts may occur. When multiple people modify and submit the same file at the same time, SVN cannot automatically merge the changes, and conflicts need to be resolved manually.

The above are the general usage steps of SVN. The specific operation details will vary according to the selected SVN client tool.
It is recommended to refer to the documentation or official guide of the relevant tool for more detailed usage instructions.

3.3. Folder global ignore

During the development process, some files do not need to be submitted, so they need to be ignored.

1) Apply the attribute recursively
insert image description here
2) Ignore the effect
insert image description here
3) Import and export ignore files
insert image description here

You need to check the recursive application of this attribute, and it will automatically traverse all the bin folders under the current file and mark them as ignored.
In this way, it is not necessary, bin and obj are ignored for each project, and the ignored information can also be exported. Next time the code is rechecked out, it can be imported directly

Guess you like

Origin blog.csdn.net/lmy_520/article/details/132604676