Source code management for pair programming

    The first time I tried pair programming, although I only tried a very simple unit test, I had a general understanding of the entire pair programming process.

    Personally, it is probably the following process: personal programming -> push to github -> peer pull code -> peer programming -> peer push to github 

    Although the whole process does not seem to be difficult, there may be some problems in the middle. For example: the problems encountered in check-in and check-out, the problem of merge conflicts, I will explain them one by one.

    First of all, this time our group is trying to unit test the calculation of addition, subtraction, multiplication and division. I am mainly responsible for the writing of the source code, while my peers complete the writing of the test code. When uploading my code to github, I refer to the blog of the following author: https://blog.csdn.net/heyangyi_19940703/article/details/54945000

    Secondly, the companion needs to pull the code from github and run it, refer to the following blog: https://blog.csdn.net/chyo098/article/details/79268136

    Of course, there may be merge conflicts in this process, and the situation cannot be directly run. At this time, it is necessary to find out the difference between the two environments, or to modify the different versions. This is similar to downloading other people's code from github. .

    Finally, you need your partner to push the code to github. If you use the above method to pull down the code, just push it directly.

    At this point, you can see the following on github:

    

    But the premise is that the peers have been pulled into your project, or the permissions of members of the organization have been modified to admin or write.


    Although I only tried a very simple unit test this time, I have mastered the general process and method of pair programming, which will be helpful for the programming of future team projects.

    Attach the github address for reference:

    https://github.com/StrawberryWithChocolate/junit-Calculator-Test

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324886671&siteId=291194637