首页 > 其他 > 详细

底层命令

时间:2020-07-04 23:07:16      阅读:68      评论:0      收藏:0      [点我收藏+]

底层命令

git对象
    git hash-object -w fileUrl : 生成一个key(hash值):val(压缩后的文件内容)键值对存到.git/objects
tree对象
    git update-index --add --cacheinfo 100644 hash test.txt : 往暂存区添加一条记录(让git对象 对应 上文件名)存到.git/index
    git write-tree : 生成树对象存到.git/objects
commit对象
    echo ‘first commit‘ | git commit-tree treehash : 生成一个提交对象存到.git/objects
对以上对象的查询
    git cat-file -p hash       : 拿对应对象的内容
    git cat-file -t hash       : 拿对应对象的类型

查看暂存区

git ls-files -s

底层命令

原文:https://www.cnblogs.com/lufei910/p/13236749.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!