1

Git原理分析

 2 years ago
source link: https://forrestsu.github.io/posts/git/git%E5%8E%9F%E7%90%86%E5%88%86%E6%9E%90/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

Git原理分析

2017年3月9日
| 字数 216
| Git

Git Analysis

1 我们通过实验的方式来分析,Git是如何管理本地代码的。 我们在alpha目录下新建一个number.txt文件,echo first >number.txt

git init git add number.txt

此时在.git 下会产生一个index 文本文件 查看文件: object 下会产生一个9c的文件夹,然后后面跟长度为38的字符串。(也就是40位的sha-1,前面2位作为文件夹名作为索引。) 我们用sha-1计算出


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK