Comparison between SVN and git

Source: Internet
Author: User
Tags coding standards version control system

Recently, I started to learn git and compare it with the commonly used SVN to learn more about the advantages and disadvantages of both parties.

In fact, git and SVN are very similar, and they all have operations such as commit and merge. It seems that this is the basic operation of the source code management tool.

1. Git is distributed and SVN is centralized. The advantage is that there will not be too many conflicts with other colleagues.CodePut it on your computer and submit and merge it after a period of time. You can also submit it locally without going online;

2. After git is downloaded, you can see all the logs locally without having to connect to the Internet. It is easy to learn, but SVN needs to be connected to the Internet;

3. git encourages branch, while SVN, to be honest, I have used branch a few times. I have never used Branch merge that comes with SVN, when there is merge, the beyond compare tool is used for merging and then commit;

4. tortoise also has a git version, which is really good;

5. before committing SVN, we recommend that you update it first. It is okay to compile the code locally and ensure that the developed functions are normal before submission. This is actually quite troublesome, several times, without updata first
A commit error occurs, delaying everyone's time. Git may be less prone to this situation.

You can also search for git and SVN commands.

Below is an articleArticleIn this discussion, the landlord thinks SVN is useless. I agree with ghoststears.

With git, SVN is purely spam.

Ghoststears:

Everything is ultimately a human problem. Tools are just tools.

SVN is centralized, and the coupling you mentioned will appear. But in another aspect, this also requires the coding standards of developers: Do not use a function to do many things, or write many classes into a single file.

In addition, it is meaningless to submit non-Running code to any version control system. This is one of the core concepts of version control. That is, the granularity of submission: atomicity. The so-called atomicity refers to the completion of a task. This task can be a function declaration, a function implementation, or a sub-system. But the mark of the completion of this task is the code that can be run and cannot be run, that is, up to half of the tasks are completed. This is not in line with version control ideas. When you update a version, the Code cannot run. What is your mood ???

Submitting codes that cannot be run is a matter of developers' quality or company management processes and mechanisms.

In addition, many people stressed that I have to work at home after work in the evening. I cannot submit a ticket !!! To attack centralized version control tools. Not to mention the attitude towards work and life. First, let's look at domestic enterprises to prevent many employees, such as thieves. How many people can take their laptopsSource codeHow about signing it out ???

In a version control system, tools are only one part. Appropriate tools should be selected based on the company's policies. Version Control! = Version control tool !!! = Source code management.

Finally, people have their own preferences. The launch of the above outline is completely unnecessary.

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.