05 - 研究 .git 目录

查看所有文章链接:(更新中)GIT常用场景- 目录

文章目录

  • [1. HEAD](#1. HEAD)
  • [2. config](#2. config)
  • [3. refs](#3. refs)
  • [4. objects](#4. objects)

1. HEAD

2. config

3. refs

4. objects

Git对象一共有三种:数据对象 blob、树对象 tree以及提交对象 commit,这些对象都被保存在了.git/objects目录下,git cat-file 查看objects目录下的对象时,例如45目录下,查看文件时需要在文件名前面加上45目录名。

bash 复制代码
git cat-file # 命令 显示版本库对象的内容、类型及大小信息。
git cat-file -t 458562a843 # 显示版本库对象的类型
git cat-file -s 458562a843 # 显示版本库对象的大小
git cat-file -p 458562a843 # 显示版本库对象的内容
  • commit、tree和blob之间的关系:


相关推荐
小前端学徒5 小时前
重新修改未提交到远程分支不是最后一次commit的内容
git
执键行天涯5 小时前
idea中已经被git缓存追踪的文件,如何让git重新忽略
git·缓存·intellij-idea
hkhkhkhkh1236 小时前
Git push 失败(remote unpack failed: Missing tree)解决方案
linux·git
拾贰_C7 小时前
【anaconda】anaconda安装配置,git安装配置以及pytorch安装
人工智能·pytorch·git
Just_Paranoid9 小时前
【Gerrit Patch】批量下载 Gerrit 提交的 Patch
git·gerrit·shell·patch
T - mars1 天前
Pycharm中使用git
ide·git·pycharm
jason_yang1 天前
Workspace搭建Vue3+组件分离的Monorepo项目
git·npm·前端工程化
鸽鸽程序猿1 天前
【Git】Git 简介及基本操作
git
ziyue75752 天前
idea终端添加git-bash,支持linux的shell语法
linux·git·bash·idea·软件
风也温柔☆2 天前
idea 拉取分支git pull报错 The branch to pull from should be selected
git·intellij-idea·debug·git pull