2015 28th Saturday svn and Git

Source: Internet
Author: User

SVN is an excellent source version of the management tool that can fit most projects. However, because of its centralized management, there is an unavoidable problem of local code backup and versioning. This means that for local code that has not yet been or cannot be submitted to the Subversion server, there are two scenarios where the error is deleted and the version update cannot be rolled back.

As a distributed version management tool, GIT can solve this problem very well. Because most of its operations are done locally. The point here is how git can manage both the local code and the existing SVN central repository. support for de-centralized, is the inherent nature of git, it is locally retained from the central server clone from the source library of all the information, so that you can modify the code in the local to submit directly to the local code repository. The problem with local code backup and versioning is that git is a light and easy fix. The synchronous operation of the local source repository and the SVN central repository is done by the GIT-SVN tool provided by Git.

But git does not completely replace SVN, and many non-pure technology development companies prefer SVN:
1. Unified control management of server company
2. Security mechanism, will not be a copy of everyone, can be limited to the group, you can also assign different groups
3. Teamwork development to pass the amount of data will not be too large, git because it is mirrored, if there is a design to pass a 500MB psd, not related personnel to download, very wasteful traffic and update time
4.subversion feeling build very simple support HTTPS, external network access, can let employees work from home, do not worry about the flow of data transmission (good evil)
5. Everyone's computer size may not be able to install a particularly large project, for SVN, the company is equipped with a large enough server hard disk is good, and which project completed, directly delete the local directory is good, there is no need to retain
6. Online games companies, advertising companies that need a lot of media design mixed into the program of the project, very need SVN such a server.
7.SVN is really weak relative to the Git branch, but it's not possible to turn everyone's habits around by despising svn.

Git is more inclined to open source and pure code development in this regard.

There are several differences in design:
1. SVN is based on revision, which is delta,git based on state, each commit holds the full workspace directory;
2. SVN is a revision time line on a single branch, while Git is a dag composed of commits;
3. Branch's design, SVN is revision-on-write, git is adding a reference to the DAG. That is, the SVN branch is a separate timeline from the moment of creation to the date of the merger. The GIT branch is a reference to the on-off time line;
4. Based on the previous points, Git is easily designed to be distributed VCS: the content on the remote server is just another branch;

GIT benefits:
1. Distributed de-centering makes it easier to maintain a larger team. Code management is no longer the management of branch and commit processes, but the management of the Git network topology. Who is responsible for the merge to the final warehouse, and who is responsible for accepting pull request from other users. Regardless of whether you are in the core of management, you have the right to check out and modify the entire project code;
2. The convenience and speed of branch merging is improved. One of the weaknesses of revision-based versioning is that all revisions before and after a common ancestor are repeated in and merged with complex algorithms to complete the merge process. While state-based git is merging, it is only possible to launch a 3-way merge between the public ancestor, the latest commit of two branches. So git's merging is surprisingly fast. Also because such branching creates unparalleled simplicity;
3. Micro commit and Micro branch. Git can make arbitrary commits and branch so that the VCs can control the code to a very granular granularity. Every small change can be immediately commit, each small function/fix can branch. This makes it very easy to test a small modification of that and drop a small function. You can even call a commit of another branch directly to the current branch (Cherry-pick). It allows users to easily manage code as they face frequent demand changes.

Git cons:
1. Directory-level access control, allowing members to access only one directory (usually a module);
2. Intuitive version number;
3. Partially check out a directory, usually a module/branch;

Finally attach TortoiseSVN compare doc, Excel file Compare tool Setup method:

2015 28th Saturday svn and Git

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.