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 > Development >
Share
Shulou(Shulou.com)06/02 Report--
This article mainly explains "what are the differences between SVN and Git". The content of the explanation is simple and clear, and it is easy to learn and understand. Please follow the editor's train of thought to study and learn "what are the differences between SVN and Git"?
The difference between SVN and Git
1. Subversion 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 Subversion can be summarized as follows:
1. Each version library has a unique URL (official address) from which each user gets the code and data.
two。 To get updates to the code, you can only connect to this unique version library and synchronize to get the latest data.
3. Submission must have a network connection (non-local version library).
4. The submission requires authorization, and if there is no write permission, the submission will fail.
5. Submission is not always successful. If someone else submits before you, you will be prompted to "change based on the outdated version, first 6. Update and then submit"... and so on.
7. 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, Subversion 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.
Git is a distributed version control system.
Git records version history only concerned with whether the file data as a whole has changed. Git does not save data about differences between before and after changes in the contents of the file.
In fact, Git is more like taking snapshots of changed files and recording them in a miniature file system. Each time an update is submitted, it goes through the fingerprint information of all the files and takes a snapshot of the file, and then saves an index that points to the snapshot. To improve performance, if the file does not change, Git will not save it again, but will only attach the last saved snapshot.
In the distributed version control system, the client not only takes the snapshot of the latest version of the file, but also mirrors the original code repository completely. In this way, any server used to work together fails and can be recovered later with any mirrored local repository. Such systems can be designated to interact with several different remote code repositories. In this way, you can collaborate with people in different working groups on the same project. You can set different collaboration processes according to your needs.
In addition, because Git keeps all the historical updates about the current project on the local disk, and most operations in Git only need to access local files and resources without networking, it is fast to process. With SVN, you can't do anything without the Internet or disconnecting VPN. But with Git, even if you are on a plane or train, you can happily submit updates frequently and upload them to a remote image repository when the network is available. For other version control systems, this is almost impossible, or very troublesome.
Git has the following characteristics:
The version library for each clone in 1.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 2.Git is actually a full backup of the code repository.
3. The submission is done entirely locally, without authorization, your version library is up to you, and the submission will always be successful.
4. 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 5.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.
6. Conflict resolution is no longer a submission contest like SVN, but a merger and conflict resolution only when needed.
7.Git can also simulate a centralized mode of operation.
The 8.Git version library is uniformly placed on the server.
9. You can license the Git version library: who can create the version library, who can PUSH it, and who can read (clone) it.
10. Team members first clone the server's version library locally; and frequently update the server's version library (PULL).
11. Team members PUSH their changes to the server's version library, and automatically retrieve the changes when others synchronize with the version library (PULL).
12.Git 's centralized working mode is very flexible.
13. You can use the code base as usual when you are away from the network where the Git server is located, such as when you are on a business trip. You only need to be able to access the network where the Git server is located, PULL and PUSH can complete synchronization and submission with the server.
14.Git provides rebase commands to make your changes appear to be based on the latest code implementation changes.
15.Git has more working modes to choose from than Subversion.
Thank you for your reading, the above is the content of "what are the differences between SVN and Git". After the study of this article, I believe you have a deeper understanding of the differences between SVN and Git, and the specific use needs to be verified in practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!
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.