Linux (CentOs6.4) Install Git

Source: Internet
Author: User
Tags version control system

Before installing, let's look at Git and ask: why should I use Git? SVN is not very good, why do I have to change?

Q 1: Why do I need a version control system?

Versioning is a system that records changes in the content of several files to enable future review of specific revisions. Most of the time we use the most frequent or source code files version control, in fact, any file can be included in the version control system.

1). Better backup : Using a version control system can save more disk space than a different version of a file in a named storage time, because the version control system is not a copy backup of a file, but a differential backup, a file-snapshot backup, and so on.

2). Better backtracking : You can backtrack a file to any previous commit state, or even roll the entire project back to a point in time past.

3). Better Teamwork : This is what I think is most important, the team to develop a software, if there is no version control, it is unthinkable, simple point can use file transfer to a core developer library to merge, but if the team members are scattered throughout the country, or even around the world, such as the development of the Linux kernel, there is absolutely no way to proceed. With version control, you can compare file changes to the system, you can query who submitted the new update, and can be managed by the project owner to manage the submission for updates.

Q 2: What are the advantages of git compared to SVN?

Actually here really to say who better than who, really hard to say, from different angles and different needs may have different views, here I can only explain the application of the situation.

SVN is a centralized version control system: There is a single, centrally managed server that keeps revisions of all files, while collaborating members connect to the server through the client for file uploads and updates.

Pros: A. Simple to use, more in line with our conventional thinking (I spent a lot of time switching from SVN to git). B. The synchronization code is relatively simple, just one step.

Cons: A. Risk of loss of data: Most obviously, due to the centralization of features, if the repository of server disk failure, etc., you can not guarantee that all the data has been extracted, the worst case is the total loss of the entire project history change records. B. In the case of a network outage, collaboration cannot be done because the server cannot be connected for uploading and updating.

Git is a distributed version control system: The client does not just extract the latest version of the file snapshot, but instead completely mirrors the original code repository.

Advantages: A. Because anyone extracts each operation, is actually a full backup of the code warehouse, so nearly all operations can be performed locally, the speed is quite fast, and can be in the network when the operation is still unaffected, can frequently commit updates, wait until there is a network time to upload to the remote mirror warehouse.

Cons: A. Each developer has all the code that is not conducive to the confidentiality of the core code (it is not recommended to use Git if important code needs to be kept secret)

History of Git

When the professor gave us the history of git, it felt particularly interesting and adored the father of Linux, Linus Torvalds. Linux kernel development is a passion for open source people from around the world, began their use of version control system is a commercial product bitkeeper, and free to Linux use, but due to the late development of developers and so on for reasons, and BitKeeper is a commercial product, Finally, in 2005, with the Linux kernel open source community to end the partnership, Linus Torvalds in a fury to develop a Linux kernel for the development of management of the version management system git. Now Linus Torvalds rarely writes code, but merges the code submitted by others into the kernel, and more of the time is to say "Yes" or "No" to someone else's code, or to instruct others where to modify it.

git installation on Linux:

This part is updated tomorrow, because the system is installed in the intranet, it takes a lot of effort

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.