HTML5 Training organization Technical documents deep anatomy version management tools

Source: Internet
Author: User

Source: Thousand-frontal Technology forum

SVN centralized version management tool

What is SVN capable of?

In order to be able to better record the iteration version in the software development process,

Every time you modify the code submitted, the SVN server keeps records for us.

In order to be able to better co-development, and effectively solve the conflict between many people,

Many people modify a file and merge different changes, which solves a big problem in our collaborative development.

In order to be able to more convenient remote synchronization code,

Mobile phone, tablet, home computer, company computer, with today's cloud disk a truth.

A version management tool was born. SVN is one of the more popular tools.

  

650) this.width=650; "alt=" HTML5 technical documents in depth Anatomy version management tool src= http://bbs.mobiletrain.org/data/attachment/forum/201701/12/ 145935bege88b8fpiyrbgy.jpg "width=" "height="/>


This is a centralized version management where all data is exchanged and synchronized by the central server

Git Distributed version management tools

What is git capable of?

Functionally, like SVN, except it's distributed, there's no central server.

  

650) this.width=650; "alt=" HTML5 technical documents in depth Anatomy version management tool src= http://bbs.mobiletrain.org/data/attachment/forum/201701/12/ 150009p02m40d202gim3um.jpg "width=" 482 "height=" "/>"


At first glance, it seems that the ash is often complicated. This means that there is no concept of a server, or everyone is a server. Any two computers can communicate with one another

  

650) this.width=650; "alt=" HTML5 technical documents in depth Anatomy version management tool src= http://bbs.mobiletrain.org/data/attachment/forum/201701/12/ 150034xff4fnm0kbxfkx40.jpg "width=" height= "307"/>


But the problem with this is that if you want to synchronize the code, at least two machines will be powered on at the same time, so it's common practice to use git:

  

650) this.width=650; "alt=" HTML5 technical documents in depth Anatomy version management tool src= http://bbs.mobiletrain.org/data/attachment/forum/201701/12/ 150059eocnjb0z6djye62j.jpg "width=" height= "332"/>


Then there's the amazing web site of GitHub, which provides 24-hour uninterrupted service, and the code submitted on GitHub can be shared publicly, and small partners from around the world are more comfortable learning the code of others, and synchronizing the code in a version-managed way. So git was instantly popular.

But because of the complexity of git, the cost of learning is many times higher than SVN. Very unsuitable for beginners

Next, I try to illustrate the git principle in a graphical way, so that you can figure out why git looks a lot more complex and popular than SVN.

  

650) this.width=650; "alt=" HTML5 technical documents in depth Anatomy version management tool src= http://bbs.mobiletrain.org/data/attachment/forum/201701/12/ 150308ujsjy52sr9yr0qae.jpg "width=" "height="/>


But the difference is, GitHub wrote a program interface, you can register on its website, and then build your own warehouse on GitHub, and then synchronize the code past, note that I used the word synchronization, not to submit, because everyone must remember, this is distributed!!

It means that GitHub is just one of many clients (though it's a little bit special) and there's no concept of server and client.

(Note that Git is a distributed version management software, GitHub is a website platform, please do not confuse the two)

  

650) this.width=650; "alt=" HTML5 technical documents in depth Anatomy version management tool src= http://bbs.mobiletrain.org/data/attachment/forum/201701/12/ 150457d8jpsczkzv4ua442.jpg "width=" height= "277"/>


This way, you can download it directly from GitHub and submit it to GitHub for a lot more convenience.

  

650) this.width=650; "alt=" HTML5 technical documents in depth Anatomy version management tool src= http://bbs.mobiletrain.org/data/attachment/forum/201701/12/ 150555l5syvootz5cbpxnr.jpg "width=" height= "296"/>


In this case, you will have a question, what is the difference between this and SVN? SVN doesn't seem to be doing this, is it?

First, this is really no different from SVN.

However, if the GitHub site hangs up, Zhang San, John Doe, Harry can still be directly synchronized with each other code, SVN do it?

Second, it's important to point out that git has more than just this benefit, and the bigger advantage is that it has different ways of managing files with SVN.

A software from the establishment, to the final release on-line, if you count each submission, you think it will go through tens of thousands of versions?

We all know that the biggest benefit of versioning is that we can keep our historical version, and not lose it for no reason at the time of code development, and see the ins and outs of bugs.

So how do you do that?

If you keep a copy of the file every time you modify it, how many hard drives do you need to install?

SVN is a centralized management, the file is submitted to a place, the server's storage pressure is gone.

Therefore, it is the version of the file control, in an incremental, only the modified part of the record, do not produce redundant data.

  

650) this.width=650; "alt=" HTML5 technical documents in depth Anatomy version management tool src= http://bbs.mobiletrain.org/data/attachment/forum/201701/12/ 150711s5mi00qzm69470m3.jpg "width=" height= "223"/>


But you know, it's not easy to just record changes, do not generate redundancy, and you have to restore each version accurately and resolve conflicts.

So you know, why now SVN is still in the wrong operation of the error can not be submitted, the bug is flying.

We have to say that SVN is a very good version of the management software, if it had invented the branch structure earlier, if before GitHub appeared Svnhub, perhaps ....

Forget it, don't mention the past, and then talk about how Git manages files.

Git is saved as a snapshot of a file, which means that each version is a copy of the file

Of course, for uncommitted commits, Git automatically generates a virtual index, like a shortcut, to save space,

But even so, you certainly feel that this is a waste of space. That's why we invented the branch (fork).

  

650) this.width=650; "alt=" HTML5 technical documents in depth Anatomy version management tool src= http://bbs.mobiletrain.org/data/attachment/forum/201701/12/ 150803f3zxo3l3ifki99ab.jpg "width=" height= "222"/>


We also take GitHub as an example, now that it's going to become a server-like role, providing code hosting for everyone.

How to solve such a large amount of redundancy? That is to find ways to put redundancy locally.

First, we cloned a copy of the project from GitHub to our local,

We refer to the project on GitHub as the backbone, our own is called the branch, and our modifications are only submitted locally.

Wait until the version is stable, or I am responsible for the development of the module is completed, and then submit the final version to the remote repository.

This process is called branching merge

Of course, it's up to the person who created the project to be able to merge.

Imagine that you launched an open source Project 1.0, countless people to help you write the 2.0 version, and sent you a merger request.

Wouldn't it be nice to have a review and pick one of the best merges into your project?

  

650) this.width=650; "alt=" HTML5 technical documents in depth Anatomy version management tool src= http://bbs.mobiletrain.org/data/attachment/forum/201701/12/ 150923m5kjettfoefi2f2p.jpg "width=" height= "399"/>

finally share a HTML5 Video Tutorial course system interpretation: Http://pan.baidu.com/s/1o7B9OYA

HTML5 Training organization Technical documents deep anatomy version management tools

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.