Five basic differences between GIT and SVN

If you’re reading this article, you’re right with most developersGITInterested, if you have not had a chance to try the GIT, I think now you have to understand it.

Not just a version control system, it is also a content management system (CMS), work management system and more. If you are a person with a SVN background, you need to do some thought transformation to accommodate some of the concepts and features provided by GIT. So, the main purpose of this article is to describe what GIT can do with itSVNWhat is the difference at a deeper level to help you know it.

That’s fine, here’s it …


  1. GIT is distributed, SVN is not:

    This is the core difference between GIT and other non-distributed version control systems such as SVN and CVS. If you understand this concept, then you’re halfway up. Need to make a few declarations, GIT is not the first or only distributed version control system. There are other systems, for exampleBitkeeper,MercurialAnd so on, is also running on a distributed model. But GIT is doing better in this area and has more powerful features.

    GIT like SVN has its own centralized repository or server. However, GIT prefers to be used in distributed mode, where each developer clones an own repository on his own machine after checking out code from a central repository / server. It can be said that if you are trapped in a place where you can not connect to the internet, like in an airplane, in a basement, in an elevator, etc., you are still able to submit documents, view historical version records, create project branches, and so on. For some, this does not seem to be much use, but when you suddenly encounter a network environment, this will solve your big trouble.

    Again, this distributed mode of operation is a huge plus for the open source community, and you do not have to patch it out and send it out via e-mail. You just have to create a branch to work with the project team Send a push request. This keeps your code up to date and will not be lost during the transfer.GitHub.comIt’s one such good case.

    Some rumors come out that future versions of subversion will also be based on distributed mode. But at least not yet see it.

  2. GIT content by metadata storage, SVN is by file:

    All resource control systems hide the meta-information of a file in a folder like .svn, .cvs, and so on. If you compare the size of your .git directory to .svn, you’ll notice that they are a big difference. Because the .git directory is a clone of the repository on your machine, it has everything in the central repository, such as labels, branches, version records, and more.

  3. The branches of the GIT branch and the SVN are different:

    Branches in SVN are not unusual at all, and they are another directory in the repository. If you want to know if a branch is merged, you need to manually run commands like thissvn propget svn: mergeinfo, To confirm the code is merged. Thanks to Ben students for pointing out this feature. Therefore, it is often the case that some branches have been missed.

    However, dealing with GIT’s branch is fairly straightforward and fun. You can quickly switch between several branches from the same working directory. You can easily find unincorporated branches, and you can combine these files simply and quickly.

  4. GIT does not have a global version number, and SVN has:

    This is by far the biggest feature missing from the GIT over SVN. As you know, the version number of the SVN is actually a snapshot of the source code at any given time. I think it is the biggest breakthrough in the evolution from CVS to SVN. Because GIT and SVN conceptually different, I do not know what characteristics GIT corresponds to. If you have any clues, please share with us in the comments.

    Update: Some readers have pointed out that we can use GIT SHA-1 to uniquely identify a code snapshot. This does not completely replace the easy-to-read digital version number in SVN. However, the purpose should be the same.

  5. GIT content integrity is better than SVN:

    Git content storage is usedSHA-1Hash algorithm. This ensures the integrity of the code content and ensures that the repository is protected from corruption in the face of disk failures and network problems. Here’s a good discussion about the integrity of GIT content –

Is there any difference between GIT and SVN? of course not. I think these 5 are just“the basic”with“Most attractive”I just think of this 5:00. If you find that there are more interesting than these 5 points, please share it, welcome.

Leave a Reply