Git core objects
Git core objects
Core objects in git
- blob object
- tree object
- commit object
Git low level commands
- git hash-object
- git cat-file
- git update-index
- git write-tree
- git read-tree
- git commit-tree
git hash-object
git hash-object
used to compute object ID and optionally create a blob from a file.
$ echo "Hello furzoom" | git hash-object -w --stdin
85b75207c07fe1be1e5116f73b74e1eb4a92a4a5
-w
tells hash-object to store the object. --stdin
tells the command to read the content from stdin.
git cat-file
git cat-file
provide content or type and size information for repository objects.
$ git cat-file -p 85b75207c07fe1be1e5116f73b74e1eb4a92a4a5
Hello furzoom
p
tells cat-file to figure out the type of content and display it nicely for you.
git update-index
git update-index
register file contents in the working tree to the index.
$ echo 'new file' > new.txt
$ git update-index --add new.txt
--add
tells update-index to add file to index (staging area).
git write-tree
git write-tree
create a tree object from the current index.
$ git write-tree
git read-tree
git read-tree
reads tree information into the index.
$ git read-tree <tree-sha1>
git commit-tree
git commit-tree
create a new commit object.
$ git commit-tree <tree-sha1> -p <parent-tree-sha1>
Git core objects的更多相关文章
- 使用EF6.0出现:CS0029 无法将类型“System.Data.Entity.Core.Objects.ObjectContext”隐式转换为“System.Data.Objects.ObjectContext”错误
这是因为EF6.0重构了一些命名空间后,和VS原有的实体数据模型模板不一致了(ObjectContext context = ((IObjectContextAdapter)dataContext). ...
- Know the Core Objects of Your App---了解应用程序的内核对象
Back to App Design You develop apps using the Cocoa application environment. Cocoa presents the app’ ...
- git core.autocrlf配置 解决Windows和Linux(Mac)换行问题
格式化 格式化是许多开发人员在协作时,特别是在跨平台情况下,遇到的令人头疼的细小问题. 由于编辑器的不同或者Windows程序员在跨平台项目中的文件行尾加入了回车换行符, 一些细微的空格变化会不经意地 ...
- git core.autocrlf配置说明
格式化 格式化是许多开发人员在协作时,特别是在跨平台情况下,遇到的令人头疼的细小问题. 由于编辑器的不同或者Windows程序员在跨平台项目中的文件行尾加入了回车换行符, 一些细微的空格变化会不经意地 ...
- Git原理与命令大全
Git (wiki: en chs )是一个免费开源的分布式版本控制系统,由linux内核作者linus Torvalds开发,大型开源项目linux kernel.Android.chromium ...
- 第六节《Git克隆》
本节学习如何使用git clone命令建立版本库克隆,以及如何使用git push和gitpull命令实现克隆之间的同步. Git的版本库目录和工作区在一起,因此存在一损俱损的问题,即如果删除一个项目 ...
- Git Pro深入浅出(三)
七.自己定义Git 前面已经阐述了Git基本的运作机制和使用方式,介绍了很多Git提供的工具来帮助你简单且有效地使用它.本部分将演示怎样借助Git的一些重要的配置方法和钩子机制,来满足自己定义的需求. ...
- 再谈git和github-深入理解
git中的 objects 和 refs 是什么? 目录objects是仓库的 "对象库" , 是包含 代码, 提交, 日志, 信息, 索引等信息的关键所在 refs是一些 sha ...
- 如果非得了解下git系统... - 实践篇
git的定义是一个内容寻址文件系统.内容.寻址.文件.系统,该来的总会来的… 本文旨在通过实践来介绍.git文件夹中的目录及文件功能,属git基础知识.但在此基础上可解决各git使用过程中可能遇到的问 ...
随机推荐
- linux 系统时间硬件时间同步
1.设置系统时间:date-s 21/05/2016 date -s 08:21:21 2.系统时间同步到硬件时间: clock --systohc
- OC中动态创建可变数组的问题.有一个数组,数组中有13个元素,先将该数组进行分组,每3个元素为一组,分为若干组,最后用一个数组统一管理这些分组.(要动态创建数组).两种方法
<span style="font-size:24px;">//////第一种方法 // NSMutableArray *arr = [NSMutableArray a ...
- CSS之BFC
BFC(Block Formatting Context,块格式上下文) 具有BFC特性的元素能够看作是隔离了的独立容器,容器里面的元素不会在布局上影响到外面的元素. 在CSS3中.BFC叫做Flow ...
- matlab-1
1.size():获取矩阵的行数和列数 (1)s=size(A), 当只有一个输出参数时,返回一个行向量,该行向量的第一个元素时矩阵的行数,第二个元素是矩阵的列数.(2)[r,c]=size(A),当 ...
- 【转载】IIS与asp.net管道
阅读目录 asp.net是什么 HTTP协议 IIS与asp.net asp.net管道 参考资料 我们在基于asp.net开发web程序,基本上都是发布部署到安装了IIS的windows服务器上,然 ...
- json解析:[1]gson解析json
客户端与服务器进行数据交互时,常常需要将数据在服务器端将数据转化成字符串并在客户端对json数据进行解析生成对象.但是用jsonObject和jsonArray解析相对麻烦.利用Gson和阿里的fas ...
- ORCAD中的一些操作小技巧
1.ORCAD中改变元器件和文本字体颜色的命令: 打开在 View -> Toolbar -> Command Window.然后圈选文字(可复选),然后到 Command Window ...
- Scrapy教程
Scrapy教程 原文地址https://doc.scrapy.org/en/latest/intro/tutorial.html 此教程我们假设你已经装好了Scrapy,如果没有请查看安装指南.. ...
- Lua学习一----------开发环境搭建
© 版权声明:本文为博主原创文章,转载请注明出处 1.LuaDist下载地址:http://luadist.org/ 2.LuaRocks下载地址:https://github.com/luarock ...
- caffe-ubuntu1604-gtx850m-i7-4710hq----bvlc_reference_caffenet.caffemodel
bvlc_reference_caffenet.caffemodel --- name: BAIR/BVLC CaffeNet Model caffemodel: bvlc_reference_caf ...