Git学习之Git对象
来源:互联网 发布:蓝牙怎么分享软件 编辑:程序博客网 时间:2024/05/21 15:00
=============================
Git对象
=============================
(1) 查看日志
$ git log -l --pretty=raw
(2) 查看Git 对象的ID的类型
$ git cat-file -t 2d392
(3) 查看Git 对象的内容
$ git cat-file -p 2d392
(4) 查看对象在对象库中的位置
$ for id in abe84366 b52c32e 6ed5ee6;
do \ ls .git/objects/${id:0:2}/${id:2}*;
done
(5) 查看跟踪链
git log --pretty=raw --graph e695606
(6) 查看当前分支
git branch
(7) 显示引用对应的提交ID
git rev-parse master
==============================
SHA1 哈希值
==============================
(1) 查看HEAD对应的提交的内容
git cat-file commit HEAD
(2) 查看提交信息中包含的字符数
git cat-file commit HEAD | wc -c
(3) 在提交信息的前面加上内容 commit 234<null>(<null>为空字符)
执行哈希算法
${printf "commit 234\000"; git cat-file commit HEAD} | shalsum
(4) 查看版本库中文件的内容
git cat-file blob HEAD:1.txt
(5) 文件包含的字节数(大小)
git cat-file blob HEAD:1.txt | wc -c
- Git学习之Git对象
- 【GIT学习】GIT对象模型
- Git学习之Git 重置
- Git学习之Git检出
- Git学习笔记(四) Git对象
- Git学习笔记(四) Git对象
- GIT之学习笔记
- Git学习之路
- Git学习之路
- git学习之路
- git 学习之二
- Git学习之旅
- git学习之路
- git 学习之路
- LINUX学习之GIT
- git学习之路
- Git学习之Git基本操作
- Git 学习之Git config 命令
- Git学习之Git基本操作
- Git学习之msysGit环境支持
- Git 学习之Git config 命令
- DBMS_JOB包的使用方法
- Git学习之Git 暂存区
- Git学习之Git对象
- Git学习之Git 重置
- Git学习之Git检出
- Git学习之Git恢复进度
- [Craftor原创] I2S总线接口设计(Verilog)
- POJ 2970 The lazy programmer 优先队列
- elipse 不能连接真机,console里面报错 "ADB server didn't ACK * failed to start daemon *"
- 我的2013——青春的躁动
- 【黑马程序员】Java基础12:UDP和TCP的网络通讯