Git Introduction and Installation
Git is currently the world's most advanced distributed version control System (no one). It's also a legendary birth, and Linux founder Linus spent two weeks writing a distributed version control system in C, which is git! If you are interested, you can see the birth of git.
What is version control?
Versioning (Revision control) is a software engineering technique that ensures that the same files edited by different people are updated during the development process.
Version control system/software provides a complete version management function for storing, tracking directory (folder) and file modification history, is the software developer's essential tool, is the software company's infrastructure. The highest goal of the version control software is to support the software company's configuration management activities, track multiple versions of development and maintenance activities, and release the software in a timely manner.
The common version control system/software is VSS, CVS, SVN, Git and so on. Introduction See Baidu Encyclopedia
What is distributed?
Distributed version Control (DVCS) is a method that does not require a central server to manage file versions, but it can also use a hub server. Changes can be incorporated into the system of any other user of DVCS, so a very flexible workflow can be achieved.
The two main advantages of DVCS are that it is more flexible than centralized versioning because it supports a variety of other workflows in addition to the traditional (centralized) workflow, which is much faster than a centralized server because most operations are performed locally on the client and do not require network operations.
Why Choose Git?
In fact, Git's learning costs are higher compared to the mainstream version control software like CVS and SVN. SVN and other graphical interface, for users of the Windows system, use and understanding are more easy to learn. For Git users, you need to understand more and more complex concepts, including files, snapshots, work trees, indexes, local repositories, remote repositories, remote, commit, branching, and Stash. Where does the advantage of CVS and svn,git manifest?
first, Git's self-sustaining storage file system
CVS, the SVN low-level adoption of the incremental file system, shown in 1. Incremental file system is characterized by: When file changes occur, the file system stores the file differences.
Figure 1. CVS, SVN log file content differences
The same is the file change submission, the Git underlying file system stores the file snapshot, the entire file content, and saves the index to the snapshot, as shown in 2. Given the performance factors, the file system does not repeatedly save the file if the file content has not changed, but simply saves a link to the file.
Figure 2. Git records the entire file snapshot
Git chooses this underlying storage data structure primarily to improve the efficiency of the GIT branch. In fact, a Git branch is essentially a mutable pointer to an indexed object, and each index object points to a snapshot of the file, as shown in 3.
Figure 3. Data structures for Git branches
In this way, the creation of branches can be done instantaneously, with little to no cost. In other words, the Git branch is inexpensive and lightweight. We look at a variety of CVS, SVN projects, which often mean a full copy of the source code, at the expense of expensive, heavyweight. For large projects, it is necessary to create various branches, which is consistent with the idea that Git encourages frequent creation and merging of branches.
second, the design idea of Git version control system is "to be centralized"
The traditional CVS, SVN and other tools use the C/s architecture, there is only one central code warehouse, located on the server side. And once the server system outage, network failure and other reasons caused the central warehouse is not available, the entire CVS, SVN system code check-in and check out is paralyzed. Even when high availability is taken into account, the cost of operating maintenance increases with the migration of another central repository to continue the code submission operation.
To get rid of the dependency on the central repository, one of the initial design goals of Git is distributed control management. We give a sample, 4 shows. If we set up a project team, the developers are mainly composed of Alice, Bob, Clair and David four members. In addition to the Central warehouse origin (the Git default remote warehouse name), each member is responsible for a local repository. From a distributed point of view, David can be seen as Alice's remote repository, and vice versa. The Git distributed design concept helps reduce the reliance on the central warehouse, effectively reducing the load on the central warehouse and improving the flexibility of code submission.
Figure 4. Git Distributed Work
Another great benefit of Git's distributed design idea is that it supports working offline. The benefits of offline work is self-evident, for the CVS, SVN this heavily dependent on the network C/S tool, without a network or VPN, it means that the loss of the right-arm, code check-in and check-out operation will not work. And once you use Git, even on a plane or train that doesn't have WIFI, you can often submit code, just submit it to the local repository, wait until the network is connected, and then upload it to the remote mirror repository.
For more details on git, refer to Git's official website: http://git-scm.com/
Install Git
Liaoche's blog post is a good illustration of how to install git, install git on a different system.
P.S installation verification, Linux under input git;windows cmd under git
Tortoisegit
Window users, for the custom tortoise style user, you can choose the Tortoisegit installation package, after the installation of the right key 8 is shown. Tortoisegit: http://code.google.com/p/tortoisegit/or http://download.tortoisegit.org/
Installing the right-click Git tool from Windows--tortoisegit
Eclipse plugin--egit
For the eclipse developer, you can choose the Eclipse plugin--egit. The official address is: Http://wiki.eclipse.org/EGit
Egit is currently an incubation project, so Egit 0.7.1 does not, and there is no guarantee that there is no bug (of course egit 0.7.1 is a formal version released after rigorous testing), But for the author such a user can meet the basic functions and can easily enjoy the eclipse integration git function. At the same time, the author says Egit 0.8 will be released as Eclipse Helios arrives on the next release, when Egit will be more powerful, with more new features to support.
Online installation : Eclipse-help-install new software ... ADD http://download.eclipse.org/egit/updates-3.6.2/
OK after the following
Tick and Next, when the installation is complete, you should be prompted to restart Eclipse
After the installation is complete, you need to configure, the corresponding use Bo Master has not been done, can refer to: http://www.cnblogs.com/draem0507/archive/2013/01/14/2859954.html
Git Learning (a) Introduction and installation