Git 深入理解

从知乎上看到有人推荐这篇文章深入理解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的叠加


猜你喜欢

转载自steeven.iteye.com/blog/2319514