Code version management method based on multi-person collaboration
By adopting a multi-person collaboration-based code version management method in software development, the problems of confusing code submission records and irregular code merging management are solved, and the efficiency of code management and code quality are improved.
Patent Information
- Application Number
- CN202411591786.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-08
- Publication Date
- 2025-02-14
AI Technical Summary
In the prior art, the code submission records are confusing and lack of clear description and classification, which leads to difficulties in maintaining and tracing codes, increasing development costs and risks, and the code merger management is not standardized, which is prone to conflicts and errors, affecting code quality and project progress.
A multi-person collaboration-based code version management method is adopted to establish a code repository and configure branch policies to clarify the uses and naming specifications of different branches to ensure the independence and isolation of code development. Developers write, submit and test code on feature branches, initiate merge requests for code review and automated testing, and project leaders merge changes to each feature branch, create merge commits, and clean up the code repository regularly.
By merging code submission records, the readability of submission information is improved, the confusion of code submission records is avoided, the code management process is simplified, the code management and maintenance efficiency is improved, the development costs and risks are reduced, and the code quality and project are ensured. progress.
Smart Images

Figure CN119440610A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of software development, and specifically relates to a code version management method based on multi-person collaboration. Background Art
[0002] In the field of software development, multi-person collaborative development is a common development model. As the scale of software development projects continues to expand, code version management becomes more and more complex. Existing code version management methods, such as the GitFlow branch management model, mainly focus on the branch management process, but do not clearly regulate code submission management. In the existing collaboration method, developers usually submit code multiple times in an iteration cycle to complete their respective tasks.
[0003] However, when multiple developers collaborate to complete iterative development, the code submission records become very confusing and contain a large number of submission records. These records often lack clear descriptions and classifications, making code maintenance and tracing difficult, increasing development costs and risks. In addition, existing code version management methods also lack effective management of code merging. In multi-person collaborative development, code merging is an essential step. However, due to the lack of a standardized merging process, conflicts and errors are prone to occur during the merging process, resulting in a decline in code quality and even affecting the progress of the project.
[0004] Therefore, it is necessary to develop a code version management method based on multi-person collaboration to solve the problems of chaotic code submission records and irregular code merge management in the existing technology, improve code management and development efficiency, and reduce development costs and risks. Summary of the invention
[0005] The purpose of the present invention is to provide a code version management method based on multi-person collaboration in order to solve the above-mentioned problems.
[0006] The technical solution adopted by the present invention is as follows: a code version management method based on multi-person collaboration, the method comprising the following steps: S1: Establish a code repository and configure branch strategies to clarify the purpose and naming conventions of different branches; S2: Developers create functional branches and perform branch operations from the main branch or other specified branches to ensure the independence and isolation of code development; S3: Write, submit, and locally test code on the functional branch to ensure that the code functions correctly and has no major defects; S4: After completing function development or bug fixing, the developer initiates a merge request to merge the function branch back to the main branch or other specified branch, and conducts code review and automated testing to ensure code quality and compatibility; S5: The project leader or designated personnel merges multiple functional branches completed in each iteration cycle and creates a merge commit that contains the changes of all functional branches and comes with detailed description information to clearly record the iteration results; S6: Apply the merge commit to the main branch or other specified branches to ensure the stability and maintainability of the code, and delete all functional branches to avoid code repository redundancy; S7: Clean up the code repository regularly, delete old commit records and unused branches, keep the code repository tidy, and improve code management and maintenance efficiency; S8: Use Git command line tools or graphical interface tools to perform code submission, merging, branch management, version viewing operations, and flexibly manage code versions; S9: Configure CI / CD tools to automate code review, testing, building, and deployment processes to improve development efficiency and code quality; S10: Generate an iteration report based on the code submission record to display the functions completed in the iteration, the bugs fixed, and the information of the remaining issues, so as to facilitate the team to track the project progress and risks. After that, the entire code version management method based on multi-person collaboration can be completed.
[0007] In a preferred embodiment, the step S1 specifically includes: Choose a suitable code hosting platform, including GitHub, GitLab or Bitbucket, create a code repository and set access permissions; Configure branch strategies to clarify the purpose and naming conventions of different branches, including: main or master branch: stores stable code for production environment deployment; Develop branch: used to develop new features and perform integration testing; Feature branch: used to develop specific functions and achieve code isolation; Bugfix branch: used to fix bugs and solve problems quickly; Release branch: used for version release and version management; Set branch protection rules, including prohibiting code submission directly on the main or develop branches, and requiring code review and merging through merge requests.
[0008] In a preferred embodiment, in step S2, the developer creates a functional branch according to the development task, and the branch naming should follow the specifications, including using the function name or the developer's name at the beginning, including feature / user-management or bugfix / issue-123; branch operations are performed from the main branch or other designated branches to ensure the independence and isolation of code development and avoid code conflicts and mutual influences; code development is performed on the functional branch, and the Git command line tool or graphical interface tool is used to submit code and view change records.
[0009] In a preferred embodiment, in step S3, the developer writes code to implement functions or fix bugs, and performs code review to ensure code quality; uses the Git command line tool or graphical interface tool to submit code, and each submission should contain clear description information to explain the content and purpose of the code changes; performs unit testing and functional testing in the local environment to ensure that the code functions correctly and has no major defects; uses the Git command line tool or graphical interface tool to view the code submission history and change records to facilitate code tracking and backtracking.
[0010] In a preferred embodiment, in step S4, after completing function development or bug fixing, a merge request is initiated to merge the function branch back to the main branch or other designated branch; the code reviewer reviews the merge request, checks the code quality and function implementation, and ensures that the code complies with project specifications and design requirements; performs automated testing, including unit testing, integration testing, and performance testing, to ensure code quality and functional correctness; after the merge request passes the review and test, the function branch is merged back to the main branch or other designated branch, and the function branch is deleted to avoid code redundancy.
[0011] In a preferred embodiment, in step S5, at the end of each iteration cycle, the project leader or designated personnel merges the codes of all functional branches into a merge commit, creating a single commit record containing changes to all functional branches; The merge submission should be accompanied by detailed description information, including the functions completed in this iteration, the bugs fixed, and the remaining issues, so that the team can track the project progress and risks; After the merge commit is made, apply the merge commit to the main branch or other specified branches to ensure the stability and maintainability of the code.
[0012] In a preferred embodiment, in step S6, after the merge submission, all functional branches are deleted to avoid the code repository being too large and to reduce maintenance costs; the code repository is cleaned up regularly, old submission records, unused branches, and temporary branches are deleted to keep the code repository tidy and improve code management and maintenance efficiency; and the Git command line tool or graphical interface tool is used for branch management and code cleaning operations.
[0013] In a preferred embodiment, in step S7, the Git command line tool provides a variety of commands to complete various version management operations, including code submission, branch creation, merging, and viewing change records; the graphical interface tool provides a more intuitive user interface for developers to use, including Sourcetree and GitKraken; Developers choose appropriate tools for code version management based on their personal habits; In step S8, Jenkins, GitLabCI / CD, and TravisCI continuous integration / continuous deployment tools are used to automate the code review, testing, building, and deployment processes; CI / CD tools automatically perform building, testing, and deployment tasks to improve development efficiency and code quality; configuring the CI / CD process requires writing configuration files to define build steps, test scripts, and deployment strategies.
[0014] In a preferred embodiment, in step S9, an iteration report is generated using a Git command line tool or a graphical interface tool to display the functions completed in each iteration, the bugs fixed, and the information of the remaining issues; the iteration report helps the team track the project progress, assess the project risks, and make follow-up plans; tools or scripts are used to automate the generation of iteration reports, including GitStats and GitHunt.
[0015] In a preferred embodiment, in step S10, team meetings are regularly organized to discuss project progress, technical issues and solutions to promote communication and collaboration among team members; team meetings are held in the form of stand-up meetings and review meetings to ensure that the meetings are efficient and have clear goals; and meeting minutes should be saved for easy review and reference by team members.
[0016] In summary, due to the adoption of the above technical solution, the beneficial effects of the present invention are: 1. In the present invention, based on the GIT distributed version control system, code submission, merge submission, code merging and other methods are used to ensure efficient work. In the existing collaborative method, developers will submit code multiple times during an iterative cycle development process. After multiple people collaborate to complete the iterative development, there will be a lot of submission records, resulting in confusion in the code submission records. Through this technology, after each developer completes their respective tasks, the submission records will be merged into one, which greatly improves the readability of the submission information.
[0017] 2. In the present invention, by merging the code submission records of a single person in an iteration cycle into one, the readability of the submission information is greatly improved, the confusion of the code submission records caused by frequent submissions is avoided, and code management and maintenance become more efficient and convenient. In combination with the GIT distributed version control system, the efficiency of the work is guaranteed, and the code submission management process is standardized through code submission, merge submission, code merging, etc., so as to establish a more complete multi-person collaborative code management system. By simplifying the code submission process and improving code management efficiency, developers can devote more time and energy to code writing and project development, thereby improving work efficiency. It helps developers to better understand the project progress and the work status of team members, thereby improving team collaboration efficiency and speeding up project development progress. This multi-person collaborative code version management method brings many benefits to the software development team by optimizing the code submission process and improving code management efficiency, and is an important means to improve software development efficiency and quality. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] Figure 1 The figure is a schematic diagram of the working principle of an embodiment of the present invention. DETAILED DESCRIPTION
[0019] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.
[0020] Reference Figure 1 , A code version management method based on multi-person collaboration, the method comprising the following steps: S1: Establish a code repository and configure branch strategies to clarify the purpose and naming conventions of different branches; S2: Developers create functional branches and perform branch operations from the main branch or other specified branches to ensure the independence and isolation of code development; S3: Write, submit, and locally test code on the functional branch to ensure that the code functions correctly and has no major defects; S4: After completing function development or bug fixing, the developer initiates a merge request to merge the function branch back to the main branch or other specified branch, and conducts code review and automated testing to ensure code quality and compatibility; S5: The project leader or designated personnel merges multiple functional branches completed in each iteration cycle and creates a merge commit that contains the changes of all functional branches and comes with detailed description information to clearly record the iteration results; S6: Apply the merge commit to the main branch or other specified branches to ensure the stability and maintainability of the code, and delete all functional branches to avoid code repository redundancy; S7: Clean up the code repository regularly, delete old commit records and unused branches, keep the code repository tidy, and improve code management and maintenance efficiency; S8: Use Git command line tools or graphical interface tools to perform code submission, merging, branch management, version viewing and other operations to flexibly manage code versions; S9: Configure CI / CD tools to automate code review, testing, building, deployment and other processes to improve development efficiency and code quality; S10: Generate an iteration report based on the code submission record to display the functions completed in the iteration, the bugs fixed, the remaining issues and other information, so that the team can track the project progress and risks, and then the entire multi-person collaborative code version management method can be completed.
[0021] Step S1 specifically includes: Choose a suitable code hosting platform, including GitHub, GitLab, or Bitbucket, create a code repository, and set access permissions.
[0022] Configure branch strategies to clarify the purpose and naming conventions of different branches, including: main or master branch: stores stable code for production environment deployment.
[0023] develop branch: used to develop new features and perform integration testing.
[0024] Feature branch: used to develop specific functions and achieve code isolation.
[0025] Bugfix branch: used to fix bugs and solve problems quickly.
[0026] Release branch: used for version release and version management.
[0027] Set branch protection rules, including prohibiting code submission directly on the main or develop branches, and requiring code review and merging through pull requests.
[0028] In step S2, developers create functional branches according to development tasks. Branch naming should follow specifications, including starting with the function name or the developer's name, including feature / user-management or bugfix / issue-123. Branch operations are performed from the main branch or other designated branches to ensure the independence and isolation of code development and avoid code conflicts and mutual influence. When developing code on a functional branch, you can use the Git command line tool or graphical interface tool to submit code, view change records, and other operations.
[0029] In step S3, developers write code to implement functions or fix bugs, and conduct code review to ensure code quality. Use the Git command line tool or graphical interface tool to submit code. Each submission should contain clear description information to explain the content and purpose of the code changes. Perform unit testing and functional testing in the local environment to ensure that the code functions correctly and has no major defects. You can use the Git command line tool or graphical interface tool to view the code submission history and change records to facilitate code tracking and backtracking.
[0030] In step S4, after completing function development or bug fixing, a Pull Request is initiated to merge the function branch back to the main branch or other specified branch. The code reviewer reviews the merge request, checks the code quality and function implementation, and ensures that the code meets the project specifications and design requirements. Automated testing, including unit testing, integration testing, performance testing, etc., is performed to ensure code quality and functional correctness. After the merge request passes the review and test, the function branch is merged back to the main branch or other specified branch, and the function branch is deleted to avoid code redundancy.
[0031] In step S5, at the end of each iteration cycle, the project leader or designated personnel merges the code of all functional branches into a merge commit, creating a single commit record containing all functional branch changes.
[0032] The merge submission should be accompanied by detailed description information, including the functions completed in this iteration, the bugs fixed, the remaining issues, etc., to facilitate the team to track the project progress and risks.
[0033] After the merge commit is made, apply the merge commit to the main branch or other specified branches to ensure the stability and maintainability of the code.
[0034] In step S6, after the merge commit, delete all functional branches to avoid the code repository from being too large and reduce maintenance costs. Clean up the code repository regularly, delete old commit records, unused branches, temporary branches, etc., keep the code repository tidy, and improve code management and maintenance efficiency. You can use the Git command line tool or graphical interface tool for branch management and code cleanup operations.
[0035] In step S7, the Git command line tool provides a variety of commands that can complete various version management operations, including code submission, branch creation, merging, viewing change records, etc. Graphical interface tools provide a more intuitive user interface for developers to use, including Sourcetree, GitKraken, etc.
[0036] Developers can choose appropriate tools for code version management based on their personal habits.
[0037] In step S8, use continuous integration / continuous deployment (CI / CD) tools such as Jenkins, GitLabCI / CD, and TravisCI to automate code review, testing, building, and deployment processes. CI / CD tools can automatically perform building, testing, and deployment tasks to improve development efficiency and code quality. Configuring the CI / CD process requires writing configuration files to define build steps, test scripts, deployment strategies, etc. In step S9, an iteration report is generated using the Git command line tool or graphical interface tool to display information such as the functions completed in each iteration, the bugs fixed, and the remaining issues. The iteration report can help the team track project progress, assess project risks, and make follow-up plans. Tools or scripts can be used to automate the generation of iteration reports, including GitStats, GitHunt, etc.
[0038] In step S10, team meetings are organized regularly to discuss project progress, technical issues and solutions, and to promote communication and collaboration among team members. Team meetings can be held in the form of stand-up meetings, review meetings, etc. to ensure that the meetings are efficient and have clear goals. Meeting minutes should be saved for easy review and reference by team members.
[0039] In the present invention, based on the GIT distributed version control system, efficient work is ensured through code submission, merge submission, code merging and the like. In the existing collaborative mode, during an iterative cycle development process, developers will submit code multiple times. After multiple people collaborate to complete the iterative development, there will be a lot of submission records, resulting in confusion in the code submission records. Through this technology, after each developer completes their respective tasks, the submission records are merged into one, which greatly improves the readability of the submission information.
[0040] In the present invention, by merging the code submission records of a single person in an iteration cycle into one, the readability of the submission information is greatly improved, the confusion of the code submission records caused by frequent submission is avoided, and code management and maintenance become more efficient and convenient. In combination with the GIT distributed version control system, the efficiency of the work is guaranteed, and the code submission management process is standardized through code submission, merge submission, code merging, etc., so as to establish a more complete multi-person collaborative code management system. By simplifying the code submission process and improving code management efficiency, developers can devote more time and energy to code writing and project development, thereby improving work efficiency. It helps developers to better understand the project progress and the work status of team members, thereby improving team collaboration efficiency and speeding up project development progress. This multi-person collaborative code version management method brings many benefits to the software development team by optimizing the code submission process and improving code management efficiency, and is an important means to improve software development efficiency and quality.
[0041] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the term "comprise" or any other variant thereof is intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.
[0042] The above description enables those skilled in the art to implement or use the present invention. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A code version management method based on multi-person collaboration, characterized by: The method comprises the following steps: S1: Establish a code repository and configure branch strategies to clarify the purpose and naming conventions of different branches; S2: Developers create functional branches and perform branch operations from the main branch or other specified branches to ensure the independence and isolation of code development; S3: Write, submit, and locally test code on the functional branch to ensure that the code functions correctly and has no major defects; S4: After completing function development or bug fixing, the developer initiates a merge request to merge the function branch back to the main branch or other specified branch, and conducts code review and automated testing to ensure code quality and compatibility; S5: The project leader or designated personnel merges multiple functional branches completed in each iteration cycle and creates a merge commit that contains the changes of all functional branches and comes with detailed description information to clearly record the iteration results; S6: Apply the merge commit to the main branch or other specified branches to ensure the stability and maintainability of the code, and delete all functional branches to avoid code repository redundancy; S7: Clean up the code repository regularly, delete old commit records and unused branches, keep the code repository tidy, and improve code management and maintenance efficiency; S8: Use Git command line tools or graphical interface tools to perform code submission, merging, branch management, version viewing operations, and flexibly manage code versions; S9: Configure CI / CD tools to automate code review, testing, building, and deployment processes to improve development efficiency and code quality; S10: Generate an iteration report based on the code submission record to display the functions completed in the iteration, the bugs fixed, and the information of the remaining issues, so as to facilitate the team to track the project progress and risks. After that, the entire code version management method based on multi-person collaboration can be completed.
2. A method for managing code versions based on multi-person collaboration as claimed in claim 1, characterized in that: The step S1 specifically includes: Choose a suitable code hosting platform, including GitHub, GitLab or Bitbucket, create a code repository and set access permissions; Configure branch strategies to clarify the purpose and naming conventions of different branches, including: main or master branch: stores stable code for production environment deployment; Develop branch: used to develop new features and perform integration testing; Feature branch: used to develop specific functions and achieve code isolation; Bugfix branch: used to fix bugs and solve problems quickly; Release branch: used for version release and version management; Set branch protection rules, including prohibiting code submission directly on the main or develop branches, and requiring code review and merging through merge requests.
3. A method for managing code versions based on multi-person collaboration as claimed in claim 1, characterized in that: In step S2, the developer creates a functional branch according to the development task, and the branch naming should follow the specifications, including starting with the function name or the developer's name, including feature / user-management or bugfix / issue-123; branch operations are performed from the main branch or other designated branches to ensure the independence and isolation of code development and avoid code conflicts and mutual influences; code development is performed on the functional branch, and the Git command line tool or graphical interface tool is used to submit code and view change records.
4. A method for managing code versions based on multi-person collaboration as claimed in claim 1, characterized in that: In step S3, developers write code to implement functions or fix bugs, and conduct code review to ensure code quality; Use Git command-line tools or graphical interface tools to submit code. Each submission should contain clear description information to explain the content and purpose of the code changes. Perform unit tests and functional tests in the local environment to ensure that the code functions correctly and has no major defects. Use the Git command-line tool or graphical interface tool to view code submission history and change records for easy code tracking and backtracking.
5. A method for managing code versions based on multi-person collaboration as claimed in claim 1, characterized in that: In step S4, after completing function development or bug fixing, a merge request is initiated to merge the function branch back to the main branch or other specified branch; Code reviewers review merge requests, check code quality and functional implementation, and ensure that the code meets project specifications and design requirements; perform automated testing, including unit testing, integration testing, and performance testing, to ensure code quality and functional correctness; After the merge request passes review and testing, merge the feature branch back to the main branch or other specified branch, and delete the feature branch to avoid code redundancy.
6. A method for managing code versions based on multi-person collaboration as claimed in claim 1, characterized in that: In step S5, at the end of each iteration cycle, the project leader or designated personnel merges the code of all functional branches into a merge commit, creating a single commit record containing changes to all functional branches; The merge submission should be accompanied by detailed description information, including the functions completed in this iteration, the bugs fixed, and the remaining issues, so that the team can track the project progress and risks; After the merge commit is made, apply the merge commit to the main branch or other specified branches to ensure the stability and maintainability of the code.
7. A method for managing code versions based on multi-person collaboration as claimed in claim 1, characterized in that: In step S6, after the merge submission, all functional branches are deleted to avoid the code repository from being too large and to reduce maintenance costs; the code repository is cleaned up regularly, old submission records, unused branches, and temporary branches are deleted to keep the code repository tidy and improve code management and maintenance efficiency; Use Git command-line tools or graphical interface tools to manage branches and clean up code.
8. A method for managing code versions based on multi-person collaboration as claimed in claim 1, characterized in that: In step S7, the Git command line tool provides a variety of commands to complete various version management operations, including code submission, branch creation, merging, and viewing change records; the graphical interface tool provides a more intuitive user interface for developers to use, including Sourcetree and GitKraken; Developers choose appropriate tools for code version management based on their personal habits; In step S8, Jenkins, GitLabCI / CD, and TravisCI continuous integration / continuous deployment tools are used to automate the code review, testing, building, and deployment processes; CI / CD tools automatically perform building, testing, and deployment tasks to improve development efficiency and code quality; configuring the CI / CD process requires writing configuration files to define build steps, test scripts, and deployment strategies.
9. A method for managing code versions based on multi-person collaboration as claimed in claim 1, characterized in that: In step S9, an iteration report is generated using the Git command line tool or a graphical interface tool to display the functions completed in each iteration, the bugs fixed, and the remaining issues; Iteration reports help teams track project progress, assess project risks, and develop follow-up plans; use tools or scripts to automate the generation of iteration reports, including GitStats and GitHunt.
10. A method for managing code versions based on multi-person collaboration as claimed in claim 1, characterized in that: In step S10, team meetings are organized regularly to discuss project progress, technical issues and solutions, and to promote communication and collaboration among team members. Team meetings are held in the form of stand-up meetings and review meetings to ensure that the meetings are efficient and have clear goals. Meeting minutes should be saved for easy review and reference by team members.
Citation Information
Cited By
Metadata version control method
CN121979865A
A metadata versioning method
CN121979865B
Integrated version management and release method based on DevOps
CN122411963A