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使用过程中可能遇到的问 ...
随机推荐
- SFTP & FTP Upload
简述 >> FTP: 1. Install FTP service on Linux(Red Hat) as root user [root]# yum install ftp 2. ...
- docker入门小结(二)
11,网络使用 sudo docker run -d -P training/webapp python app.py sudo docker ps -l 这样将主机一个端口映射到容器中,由于app. ...
- 【VBS】使用Visual Studio调试VBS程序
首先要确保机器上安装了Visual Stuido, 然后打开命令行窗口执行如下命令,会弹出是否使用Visual Studio进行调试的确认窗口. 点[是]进行调试. WScript.exe [vbs文 ...
- VC6 在使用VC助手(Visual AssistX)在Win7下不能使用↑↓←→及回车键选择的解决的方法
VC6使用Visual AssistX版本号的问题,换一个版本号.如"Visual Assist X 10.8.2029"就可以解决. http://pan.baidu.com/w ...
- jQuery--基础(实例)
jQuery的操作方法并不需要都记下来,但是使用什么功能需要什么样的方法,我们是一定会知道的.所以写实例来进行对功能方法的练习和熟练,是最快能够掌握jQuery的方法. <!DOCTYPE ht ...
- 织梦在广告(myad)中使用css样式
使用单引号,以及只有style这一个属性
- LinkedList 基本示例及源码解析
目录 一.JavaDoc 简介 二.LinkedList 继承接口和实现类介绍 三.LinkedList 基本方法介绍 四.LinkedList 基本方法使用 五.LinkedList 内部结构以及基 ...
- python etree解析xml
# -*- coding:utf-8 -*- #conding:utf-8 __author__ = 'hdfs' ''' 简洁 高效 明了 ElementTree轻量级的 Python 式的 API ...
- 【转】安卓逆向(一)--Smali基础
转载自吾爱破解安卓逆向入门教程 APK的组成 文件夹 作用 asset文件夹 资源目录1:asset和res都是资源目录但有所区别,见下面说明 lib文件夹 so库存放位置,一般由NDK编译得到,常见 ...
- iOS - web自适应宽高(预设置的大小)
//web自适应宽高 -(void)webViewDidFinishLoad:(UIWebView *)webView { NSLog(@"wessd"); [ webView s ...