xgqfrms™, xgqfrms® : xgqfrms's offical website of cnblogs! xgqfrms™, xgqfrms® : xgqfrms's offical website of GitHub!

Git Object All In One

Git Object All In One

demos

$ tree .git/objects

$ cd .git/objects

# type: blob / tree ...
$ git cat-file -t [hash]
# file: string
$ git cat-file -p [hash]

image

image

git 分区

image

Git Objects

$ git init test
Initialized empty Git repository in /tmp/test/.git/
$ cd test
$ find .git/objects
.git/objects
.git/objects/info
.git/objects/pack
$ find .git/objects -type f

https://git-scm.com/book/en/v2/Git-Internals-Git-Objects

git cat-file

# git cat-file
git cat-file <type> <object>
git cat-file (-e | -p) <object>
git cat-file (-t | -s) [--allow-unknown-type] <object>
git cat-file (--batch | --batch-check | --batch-command) [--batch-all-objects]
    [--buffer] [--follow-symlinks] [--unordered]
    [--textconv | --filters] [-z]
git cat-file (--textconv | --filters)
    [<rev>:<path|tree-ish> | --path=<path|tree-ish> <rev>]

https://git-scm.com/docs/git-cat-file

(🐞 反爬虫测试!打击盗版⚠️)如果你看到这个信息, 说明这是一篇剽窃的文章,请访问 https://www.cnblogs.com/xgqfrms/ 查看原创文章!

refs

https://www.bilibili.com/video/BV1RJ411X7kh/?t=497



©xgqfrms 2012-2021

www.cnblogs.com/xgqfrms 发布文章使用:只允许注册用户才可以访问!

原创文章,版权所有©️xgqfrms, 禁止转载 🈲️,侵权必究⚠️!


posted @ 2023-03-17 15:53  xgqfrms  阅读(15)  评论(2编辑  收藏  举报