Talking about the difference between git and svn

Source: Internet
Author: User
Tags svn

Recently playing git, just talk about the difference between git and SVN.

1. The most important difference is that git is distributed, and SVN is not distributed.

GIT has its own centralized repository and server side like SVN, but git is distributed, and when checked out in the central repository or on a server, it clones its own repository on its own machine, and when it can't connect to the network, you can still submit files, view history, Create a branch, etc., and wait for the network to connect again on push to server side.

2.Git stores content as metadata, and SVN is file-based.

Because the. Git directory is a cloned version of the repository on your machine that has everything in the central repository, such as tags, branches, version records, and so on. All resource control systems hide the file's original information in a similar. Svn,.cvs folder. The size of the Git directory is larger than the. SVN comparison. Both are new files and the volume size can be compared.


3.Git does not have a global version number, and SVN has.

The content of the 4.Git is better than the Svn:git content store using the SHA-1 hashing algorithm. Linux kernel pathfinder and git developer--linus says git uses SHA-1 not for security, but for data integrity, and it guarantees that, after many years, when you re-checkout a commit, it must have been the state of it years ago, Completely a touch, completely trustworthy.

5. Cloning a brand new directory in the same five branches, SVN is copying 5 versions of the file at the same time, that is, repeating the same action five times. And git just gets the elements of each version of the file, and then just loads the main branch (master), which saves time.

6. Repository (repository): SVN can only have one designated central repository. When there is a problem with this central repository, all work members are paralyzed together until the repository is repaired or the new repository is set up. And git can have an unlimited repository. Or, more correctly, every git is a repository, the difference is whether they have an Active Directory (git working tree). If something happens to the major repository (for example, the repository on GitHub), work members can still submit in their own local repository (locally repository), waiting for the major repository to recover. A work member can also be submitted to another repository.

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.