---
title: "Git 深入理解"
author: "steeven"
date: "2016-08-22T20:36:01Z"
tags: []
categories: ["开源软件"]
slug: "git"
draft: false
lastmod: "2016-08-23T09:24:32Z"
id: 2319514
url: "https://steeven.iteye.com/blog/2319514"
---

从知乎上看到有人推荐这篇文章深入理解GIT, 因为GIT看起来功能很多，其实原理很简单。 
GIT from the Bottom up
https://jwiegley.github.io/git-from-the-bottom-up/1-Repository/5-the-beauty-of-commits.html

重点：

文件是blob, 相同内容hash一样
tree, 包含几个文件，通常包含在提交里面
tree也可以包含其他tree
提交包含的是tree,和描述
提交可以有多个parent --这个相当于直接merge
每个parent当然可以有多个提交，就成了分支
所谓分支和tag都是commit, 就是一串tree的叠加