table of Contents
Fundamental
Check principle
Git the underlying hash algorithm SHA-1 algorithm to verify the same document. In fact, the hash algorithm is an encryption algorithm, can be different sizes and forms of documents, and parsed into a unique encryption result a fixed length (provided by the hash algorithm is the same), and when the file changes slightly large hash value will change, and thus can check the file information is consistent.
Management mechanism
GIT is to manage files by way of a snapshot version, the version in the form of a linked list to store the files. That each submission, GIT will be packed into a snapshot, and will retain its index value, the original pointer to the new node. If the file has not changed, the new node will not output, but a pointer to the original node, but to leave a record.
Branch Management
Branch increased
Just add a pointer, not a copy of the file (more efficient)
Branch switch
Switching the pointer
Version branch
Pointer moves essentially
Branches merge
GIT and remote connections GitHub
GitHub is a remote link library, it can be seen as a database, and GitHub GIT is developed for users to upload and manage their own project version control tool.
The basic steps:
To create a remote library
Link Library
Surnamed
Easy to use many times later, each time does not need to be copied again
command
git remote add an alias to add alias address
git remote -v View aliases
effect
Push file
command
git push alias branch name
effect
Clone file
command
Address git clone remote repository
effect
Crawl File
pull = fetch + merge two compositions.
Generally larger files, first fetch download, then check ensure that no problems, and then merge merge files
command
Branch address of the remote repository git pull remote library
effect
Version Conflict
condition
GitHub does not support the modification is not based on the latest version of push
Solution
First with pull down files crawl
The method for post processing branches to processing conflicts