In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly explains "what is the difference between the scope of application of svn and git". Interested friends may wish to have a look. The method introduced in this paper is simple, fast and practical. Let's let the editor take you to learn "what's the difference between svn and git?"
Git is an open source distributed version control system for efficient and high-speed version management of projects ranging from very small to very large. Svn is an open source centralized version control system, which is used for multiple people to jointly develop the same project to achieve shared resources and ultimately centralized management.
The operating environment of this tutorial: Windows7 system, Git2.30.0 version, Dell G3 computer.
What is git?
Git is a free, open source distributed version control system for agile and efficient handling of any small or large project
Git is an open source distributed version control system for efficient and high-speed version management of projects ranging from very small to very large. Git is an open source version control software developed by Linus Torvalds to help manage Linux kernel development.
The biggest difference between distributed and centralized is that developers can submit it locally, and each developer copies a complete Git repository on the local machine through git clone.
Git is a distributed version control system.
Git has the following characteristics:
The version library for each clone in Git is equal. You can create your own version library from any clone of the version library, and your version library can also be provided to others as a source, as long as you want.
Each extraction operation of Git is actually a full backup of the code repository.
The submission is done entirely locally, without authorization, your version library is up to you, and the submission will always be successful.
Even changes based on the old version can be successfully committed, and the commit creates a new branch based on the old version.
The submission of Git will not be interrupted until your work is completely satisfied, PUSH gives or others PULL your version library, merging will occur in the process of PULL and PUSH, and conflicts that cannot be resolved automatically will prompt you to do so manually.
Conflict resolution is no longer a submission contest like SVN, but a merger and conflict resolution only when needed.
Git can also simulate a centralized mode of operation.
The Git version library is uniformly placed in the server
Git version libraries can be licensed: who can create the version library, who can PUSH it, and who can read (clone) the version library
Team members first clone the server's version library locally; and frequently update the server's version PULL
Team members PUSH their changes to the server's version library, and when others synchronize with the version library (PULL), they automatically get the changes
The centralized working mode of Git is very flexible.
You can use the code base as usual when you are away from the network where the Git server is located, such as mobile office / business trip.
You only need to be able to access the network where the Git server is located, PULL and PUSH can complete synchronization with the server and submit
Git provides rebase commands to make your changes appear to be based on the latest code implementation changes
Git has more working modes to choose from than Subversion.
What is svn?
SVN is the abbreviation of subversion, is an open source version control system, through the efficient management of branch management system, in short, it is used for multiple people to jointly develop the same project, to achieve shared resources, to achieve the final centralized management.
SVN manages data that changes over time. The data is placed in a central data archive (repository). This archive is very much like an ordinary file server, but it remembers every change of the file. In this way, you can restore the file to the old version, or browse the change history of the file. Subversion is a general-purpose system that can be used to manage any type of file, including program source code.
SVN is a centralized version control system.
Centralized version control systems have a single centrally managed server that holds revised versions of all files, while people who work together connect to the server through the client to retrieve the latest files or submit updates.
The characteristics of svn can be summarized as follows:
Each version library has a unique URL (official address) from which each user gets the code and data.
To get code updates, you can only connect to this unique version library and synchronize to get the latest data.
Submission must have a network connection (non-local version library)
Submission requires authorization. If there is no write permission, the submission will fail.
Submission is not always successful. If someone else submits before you, you will be prompted to "change based on the outdated version, update before submitting". And so on.
Conflict resolution is a race for the speed of submission: those who are fast, submit first, and those who are slow, submit later, may encounter trouble in conflict resolution.
The upside: everyone can see to some extent what other people in the project are doing. The administrator can also easily control the permissions of each developer.
Cons: single point of failure of the central server.
If there is an hour of downtime, during that hour, no one will be able to submit updates, restore, compare, etc., and will not be able to work together. If the disk of the central server fails and the backup is not made or not backed up in time, there is also a risk of data loss. The worst-case scenario is to completely lose all historical change records for the entire project, except for some snapshot data extracted by the client, but this is still a problem, and you can't guarantee that all the data has been extracted.
In principle, svn is only concerned with the specific differences in the contents of the file. Each time you record which files have been updated and what lines have been updated.
Differences in the scope of application of svn and git
It is applicable to different objects.
Git is suitable for developers involved in open source projects. Because of their high level, they care more about efficiency than ease of use. SVN, on the other hand, is suitable for ordinary corporate development teams. It's easier to use.
It is used in different situations.
Git is suitable for the development of a single project with multiple development roles through Internet, and SVN is suitable for the development of multiple parallel projects coordinated by project managers within the enterprise.
Rights management policies are different.
Git does not have strict rights management control, as long as you have an account, you can export, import code, and even perform fallback operations. SVN has strict permission management, which can be used to control the permissions of a subdirectory by group or individual. Distinguish between read and write permissions. More stringent, fallback operations are not supported. Make sure the code can always be tracked.
The scope of use of branch is different.
In Git, you can only branch the entire warehouse, and once deleted, it cannot be restored. In SVN, branch can target any subdirectory, which is essentially a copy operation. So, you can build a lot of hierarchical branch and delete it when you don't need it, and you can just use the old SVN version of checkout when you need it later.
Based on the third point, Git is suitable for simple software projects, typically some open source projects, such as Linux kernel, busybox and so on. On the contrary, SVN is good at multi-project management.
For example, you can store a bsp/ design document / file system / application / automated compilation script for a mobile project in a SVN repository, or a file system for five mobile projects in a SVN. N (number of items) * m (number of components) warehouses must be established in git. Only a maximum of n or m is needed in SVN.
Git uses 128bit ID as the version number, and checkout indicates which branch; it is, while SVN uses an incremental serial number as the globally unique version number, which is more concise and easy to understand. Although you can use gittag to create some textual aliases, it is only for special versions.
Traceability
The typical development process of git is to set up branches, develop them, submit them to local master, and delete branches. The consequence of this is that the details of previous changes will be lost.
Doing the same thing under SVN won't lose any details.
Local update, local restore.
SVN can easily implement local update or restore because it sets up a .svn folder in each folder for management. If you only want to update certain parts, svn can be easily implemented. At the same time, the code is wrong, at the same time, you can well achieve local restore, of course, git can also be restored through the historical version, but can not simply achieve local restore.
At this point, I believe you have a deeper understanding of "what is the difference between svn and git?" you might as well do it in practice. Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.