Spring+SpringMVC+MyBatis+easyUI Integration Basics (9) Version Control

daily verbose

Fortunately, the next main line and the knowledge points to be written are listed in the first article. Otherwise, I don't know what to write. The basic article has already listed the knowledge points of svn and git in the beginning, so This article is about version control.
The actual effect of the project is shown here , account secret: admin 123456
download address, click here
github address, here

Definition of Version Control

Wikipedia's explanation: Revision control is a standard practice for maintaining engineering blueprints, tracking the process of engineering blueprints from birth to finalization. In addition, version control is a software engineering technique that ensures that the same program files edited by different people are synchronized during the software development process.
From this concept, we derive two key points of version control, one is recording and the other is synchronization.
 

Why use version control?

    Without a version control system, the code may be accidentally overwritten or lost by others or yourself, and it is unknown who changed the code for what reason, and there is no way to restore the changes made a few days ago. With a version control system, developers only need to record (Commit) each development change and update it through the version control system.
    Everyone is modifying, adding, and deleting the code on their local hard drive. When they aggregate the code, trouble arises. It is impossible to copy the code every time and pass the file to others. Also, who has changed which files, and specifically which parts of the files have been changed? Will one person's changes overwrite another person's changes? Before going online, the work of code aggregation becomes very dangerous and needs to be very careful. Once mistakes are made, the consequences will be unimaginable. In this case, everyone's work is not only development, but virtually increases the workload for everyone, and the efficiency will be reduced. Going low, if something goes wrong, the work of code aggregation may have to be done all over again. This is only a small team of two or three people. What if it is a large team of dozens or hundreds of people? That would be a nightmare, and of course, that's not possible with a team of a few hundred people, we're just making an assumption.
    If the team adopts version control. We can browse the history of all development, and no longer fear to make any changes, because you can easily restore the previous normal version, and the version control tool will also actively merge everyone's changes and solve possible problems at each commit. For conflicts that occur, everyone has always had a compiled code in their hands. When the development reaches a certain stage, it can be directly used for testing, and there is no need for additional work to waste time. In addition, you can also know how a certain bug in the program appeared, which colleague caused it, and at what point in time. The most important point is that you don’t need to go to it deliberately, you can ask the developer where it went. One step, through version control, mastering the development progress of the team is of great help to the entire development process. There are also many other functions in version control tools, and we can also use branching and tagging functions to carry out different versions of software releases, such as stable version, maintenance version, and development version.
 

you're not alone

    The previous paragraph talked about why version control is used, but only about the benefits and positive effects of version control. In fact, the most important point is that we developers must have a consciousness that "you are not alone", you are part of the team One member, I have mentioned it many times in the articles I wrote in the past. Time is also an important resource, which requires reasonable coordination and allocation. We must ensure the development quality and development efficiency. It is very important to popularize some tools to improve work efficiency in the team.
 

git and svn

    There are still many tools for version control. For example, svn and git mentioned at the beginning of the article should be the two more popular version control tools. Currently, the demo source code mentioned in the article is hosted on github, which is convenient for everyone to consult and learn. , I also occasionally write some version control related articles in my blog. Someone also made a simple summary of the two tools: "svn is easy to learn but not easy to use, git is easy to use but not easy to learn". Of course, the summaries mentioned by others only represent other people's opinions, not your opinions. Only you will know whether the tools are good or bad and whether they are suitable or not.
For the difference between the two, you can refer to the following two articles, http://www.jianshu.com/p/bfec042349ca , http://www.cnblogs.com/somethingWithiOS/p/5636356.html , there are still many differences, But the ultimate purpose is only one, to improve our development efficiency and reduce time costs.
    There are also opinions such as "who has used git", "git is better than svn" and so on, so "we also use git", for this, what I want to say is that we are to solve problems, and Technology is not for the sake of technology, it should be based on your own situation, and what suits you is the best.
    These two tools are very good, you can decide which one to choose. There are many online tutorials on the construction of svn server. There are also some domestic alternative warehouses for git, GitCafe's GitCafe - Share a cup of Open Source , CSDN's CODE , OSChina The code hosting - open source Chinese community , or you can also use gitlab to build a private warehouse yourself. If you have time, I will introduce the detailed steps of building the two tools. You can also search for it now, and there are many related tutorials.


Epilogue

    It is still important to mention that version control tools play an important role in the continuous integration and continuous deployment of projects. This knowledge point will be discussed in the following chapters (here will be a pit first). This article about version control comes to an end here. It mainly describes the definition and the benefits of version control. Finally, several specific implementation schemes are mentioned. Which one to choose depends on their respective needs. As for the final When the plan is implemented, practice it yourself.
 
If you haven't started using version control, hurry up and use it.

Guess you like

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