Git Architecture Overview
- File addressing management system
The main differences between Git and SVN
- Storage is different
- Use it differently
- The management mode is different
Storage mode difference
- Git stores contents as metadata, similar to k/ V database key1:value1, while SVN stores file-version1, file-version2, and file-version3
Use it differently
- For SVN, commit and push
- git
The management mode is different
- SVN centralized
- Git is a distributed
Use git core commands
Understand the basic use of Git
1 Git creation and cloning Create a repository and create filesAdd to staging area
Git commit -am “Commit all and comment”
git push origin master
3. Branch management – View the current branch, Git branch
Git checkout branchName
– Create branches based on remote
git branch test origin/master
Based on the local
git branch localdev test
Merging git merge [merge target] If the state is merging, you need to manually modify the conflict and recommit the merge
Underlying Git principles
Git is a content-addressing system that is k/ V storage. Think of it as a hashMap. Will return the key, which generates the key based on the content, if the content is the same, the generated key will be the same