(1) The core difference Git is distributed, while Svn is not. Git is not the only distributed version control system out there. There are others like Mercurial, so they are not far behind. Just like Svn, Git has its own centralized version library and Server side. However, Git is more inclined to distributed development. Because every developer has a Local Repository on their computer, they can Commit, view historical version records, create project branches and other operations even without network. Wait for the network to connect again Push to the Server.

GIt is really great from above, but GIt adds Complexity at first, because it requires two Repositories(Local Repositories & Remote Repositories). In addition, you need to know which directives are in Local Repository and which are in Remote Repository.

Git stores content as metadata, whereas SVN stores content as files: because the.git directory is a clone repository on your machine, it has all the stuff in the central repository, such as tags, branches, version records, etc. Compare the size of.git directories with that of.SVN.

(3) Git does not have a global version number, whereas SVN does: This is by far the biggest feature Git lacks compared to SVN.

(4) Git content integrity is better than SVN: Git content storage uses sha-1 hash algorithm. This ensures the integrity of the code content and reduces damage to the repository in the event of disk failures and network problems.

(5) After Git is downloaded, all logs can be seen in OffLine state, but SVN cannot.

(6) At the beginning, the SVN must Update before committing, and there will be some errors when forgetting merge, which is still relatively rare.

(7) Clone a new directory. With five branches, SVN copies five versions of the file at the same time. That is to say, repeat the same action five times. Git just gets the elements of each version of the file and loads only the master branch. In my experience, cloning a SVN with nearly 10,000 commits, five branches, and about 1500 files per branch took about an hour! Git took only a minute!

SVN can only have one specified central repository. When there is a problem with the central repository, all working members are paralyzed together until the repository is repaired or a new repository is set up. Git can have an infinite number of repositories. Or, more correctly, each Git is a repository, depending on whether or not they have a Git Working Tree. If something happens to a major repository (e.g., the GitHub repository), workers can still commit in their local repository and wait for the major repository to recover. Work members can also commit to other version libraries!

On the SVN, a Branch is a complete directory. And this directory has a complete set of actual files. If a staff member wants to start a new branch, it will affect “the whole world”! Everyone will have the same branch as you. If your branch is used for sabotage (security testing), it will be like an epidemic, you change a branch, and someone else will have to re-branch and re-download, very bad. With Git, each working member can open as many branches as they want in their local repository. For example: When I want to try to break my own program (security testing) and want to keep the modified files for later use, I can open a branch and do what I like. You don’t have to worry about interfering with other staff members. As long as I don’t merge and commit to the main repository, no working members will be affected. When I don’t need the branch anymore, I just delete it from my local repository. No pain, no itch.

Git branch names can have different names. For example: my local branch name is OK, but the name of the main version library is actually master.

Most notably, I can start a branch at any Git commit point! (One way is to use gitk — all to view the entire commit record and then open the branch at any point.)

On SVN, when you Commit your work, it is recorded directly to the central repository. When you find a serious problem with your finished product, there’s nothing you can do to stop it from happening. If the network is down, you can’t submit it! Git commits are entirely local repository activities. All you have to do is “git push” to the main repository. Git’s push is actually a Sync.