git 的 cat-file 命令用法
来源:互联网 发布:阿里云独立ip主机 编辑:程序博客网 时间:2024/06/05 02:58
命令选项
git cat-file Provide content or type and size information for repository objects.
git cat-file
命令显示版本库对象的内容、类型及大小信息。
object
The name of the object to show. For a more complete list of ways to spell object names, see the “SPECIFYING REVISIONS” section in gitrevisions(7).
-t
Instead of the content, show the object type identified by object.
显示对象的类型。
-s
Instead of the content, show the object size identified by object.
显示对象的大小。
-e
Suppress all output; instead exit with zero status if object exists and is a valid object.
如果对象存在且有效,命令结束状态返回值为 0 。
-p
Pretty-print the contents of object based on its type.
根据对象的类型,以优雅的方式显式对象内容。
type
Typically this matches the real type of object but asking for a type that can trivially be dereferenced from the given object is also permitted. An example is to ask for a “tree” with object being a commit object that contains it, or to ask for a “blob” with object being a tag object that points at it.
用法示例
sha1sum
命令生成字符串 “Git” 的哈稀值:
printf Git | sha1sum
生成 HEAD
对象的哈稀值:
(printf "%s %d\000" `git cat-file -t HEAD` `git cat-file -s HEAD`; git cat-file -p HEAD) | sha1sum
参考
git-cat-file
gitrevisions
- git 的 cat-file 命令用法
- cat 命令的用法
- 删除文件夹命令、cat的用法
- linux中cat命令的用法
- linux 下cat命令的用法
- linux cat命令被忽略的用法
- Linux 下的cat命令用法
- Linux 的 cat 命令各种用法
- Linux cat命令用法
- Cat命令用法
- file 命令的用法
- git-cat-file(1) Manual Page
- GIT 源码阅读之 cat-file
- 【Linux】Cat命令用法详解
- Linux下cat命令用法
- Linux中的cat命令用法
- cat的用法
- linux cat的用法
- 可拖拽ListView
- 1095. Cars on Campus 解析
- Centos yum安装软件报软件包下载失败
- 如何通过Mybatis实现数据的增删改查(CRUD)操作?
- 使用git将项目上传到github(最简单方法)
- git 的 cat-file 命令用法
- OC内存管理机制
- ViewPager的自动循环滑动
- 13、ES6 之async
- ipython notebook for ubuntu 14.04
- ant design (antd) Upload 点击上传图片反应过慢
- 使用递归求出0,1,1,2,3,5,8,13,21,34.........数列的第20项为多少
- Java-Swing-单选按钮
- ASP--Active Server Pages Summary