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使用过程中可能遇到的问 ...
随机推荐
- (转)ubuntu/var/log/下各个日志文件
本文简单介绍ubuntu/var/log/下各个日志文件,方便出现错误的时候查询相应的log /var/log/alternatives.log-更新替代信息都记录在这个文件中 /var/log/ ...
- 2016.8.19 将div设置为隐藏使用style=“display:none”
style="display:none"表示隐藏. style="display:block"表示显示. 在代码中则使用$("#id").s ...
- 转: RPC框架 远程对象服务引擎Hprose
http://www.cnblogs.com/chenxizhang/archive/2010/07/18/1780258.html
- linux中grep注意
grep -l 只输出文件名: -h 只输出匹配的行 不输出文件名: -c 之处匹配内容的行数: -n 将结果输出的同时,也输出改行的行号: -c 统计查到的总行数: -i 忽略大小写: grep ' ...
- vue.js+koa2项目实战(六)数据库建表
数据库建表 1.打开 MySQL 终端 2.查看所有数据库 show databases 3.创建数据库 create database pet 4.进入数据库 use pet 5.创建数据表 cre ...
- Android 进程间通信——AIDL
代码地址如下:http://www.demodashi.com/demo/12321.html 原文地址:http://blog.csdn.net/vnanyesheshou/article/deta ...
- Oracle 使用TRUNCATE TABLE删除所有行
若要删除表中的所有行,则 TRUNCATE TABLE 语句是一种快速.有效的方法.TRUNCATE TABLE 与不含 WHERE 子句的 DELETE 语句类似.但是,TRUNCATE TABLE ...
- sql数据库log自动增长被取消
原因分析:数据库可分配空间为0 解决方法:增加数据库初始大小
- WinForm搭载ScintillaNET时文本由于发生偏移被隐藏解决方案
项目用ScintillaNet搭载到WinForm以满足文本编辑的需求,在用FindReplace.Scintilla.Text=“显示内容”输出文本内容的时候会碰到文本被WinForm边框隐藏的情况 ...
- Maven上传本地jar
1. 将Jar包安装到本地仓库 -- DgroupId和DartifactId构成了该jar包在pom.xml的坐标, 对应依赖的DgroupId和DartifactId -- Dfile表示需 ...