git rev-list 和 git rev-parse
git-rev-list - Lists commit objects in reverse chronological order
https://git-scm.com/docs/git-rev-list
按照时间顺序倒序排列的commit
Update: If all you need is a commit count, and you're running a newer version of git, you can use the following command:
git rev-list HEAD --count
https://github.com/chucklu/LeetCode
有master和temp两个分支,他们的共同父结点为
SHA-1: 67d9d91064128452ae40183b39aa29a0ed67a7de
获取temp上的结点,以下结点按照时间倒序
$ git rev-list master..temp
f70bf4500daca0f0e1f75fc37a8a672ac730dc98
a4599512bcb46c2f28849a591becd321ee41fcec
2eec4dac0d46b74e130a5c4a3d5fc6f4882823af
9c1580715a078217b1eab6dd8a9dba0f05f387cc
获取master上的结点
$ git rev-list temp..master
31cd5ef6f068c46222fe185870c09c959dd7113e
6925ba40d15b07b66ed44700a62492576447992f
b43d2be8e481841bdc5a6f499fc202b18853b0a0
61297782d9fb28beac0c4bb7aa9b8cacf9db9c63
09f1b97c7474907ebba0c61cc605ecf22cebe27a
ec5dd1be93b5afb21b185310e52630a4f91544d0
aff4fd835d128dd33dc8188f82537d4aa1512895
获取共同父结点之外的结点 也是按照时间倒序,会是乱序的
$ git rev-list temp...master
31cd5ef6f068c46222fe185870c09c959dd7113e
6925ba40d15b07b66ed44700a62492576447992f
b43d2be8e481841bdc5a6f499fc202b18853b0a0
f70bf4500daca0f0e1f75fc37a8a672ac730dc98
a4599512bcb46c2f28849a591becd321ee41fcec
2eec4dac0d46b74e130a5c4a3d5fc6f4882823af
9c1580715a078217b1eab6dd8a9dba0f05f387cc
61297782d9fb28beac0c4bb7aa9b8cacf9db9c63
09f1b97c7474907ebba0c61cc605ecf22cebe27a
ec5dd1be93b5afb21b185310e52630a4f91544d0
aff4fd835d128dd33dc8188f82537d4aa1512895
git rev-parse
https://git-scm.com/docs/git-rev-parse
Dotted Range Notations
- The .. (two-dot) Range Notation
-
The ^r1 r2 set operation appears so often that there is a shorthand for it. When you have two commits r1 and r2 (named according to the syntax explained in SPECIFYING REVISIONS above), you can ask for commits that are reachable from r2 excluding those that are reachable from r1 by ^r1 r2 and it can be written as r1..r2.
- The … (three-dot) Symmetric Difference Notation
-
A similar notation r1...r2 is called symmetric difference of r1 and r2 and is defined as r1 r2 --not $(git merge-base --all r1 r2). It is the set of commits that are reachable from either one of r1 (left side) or r2 (right side) but not from both.
In these two shorthand notations, you can omit one end and let it default to HEAD. For example, origin.. is a shorthand for origin..HEAD and asks "What did I do since I forked from the origin branch?" Similarly, ..origin is a shorthand for HEAD..origin and asks "What did the origin do since I forked from them?" Note that .. would mean HEAD..HEAD which is an empty range that is both reachable and unreachable from HEAD.
git rev-list 和 git rev-parse的更多相关文章
- Git详解之八 Git与其他系统
以下内容转载自:http://www.open-open.com/lib/view/open1328070454218.html Git 与其他系统 世界不是完美的.大多数时候,将所有接触到的项目全部 ...
- git 入门教程之 git bash 竟然不支持 tree 命令
开门见山 git bash 是 Windows 用户安装 git 时默认安装的命令行工具,不仅界面漂亮功能也不错,大多数情况下可以替代 Windows 原生的 cmd 命令行. 然而,git bash ...
- Git 进阶指南(git ssh keys / reset / rebase / alias / tag / submodule )
在掌握了基础的 Git 使用 之后,可能会遇到一些常见的问题.以下是猫哥筛选总结的部分常见问题,分享给各位朋友,掌握了这些问题的中的要点之后,git 进阶也就完成了,它包含以下部分: 如何修改 ori ...
- git diff 生成patch, git apply patch 打补丁方法说明,以及分支管理的简单操作。
git diff 简易操作说明 先git log 查看commit ID, 记录你想要打的补丁的ID 比如说: git log commit 4ff35d800fa62123a28b7bda2a04e ...
- git: fatal: Not a git repository (or any of the parent directories): .git
在看书 FlaskWeb开发:基于Python的Web应用开发实战 时,下载完源码后 git clone https://github.com/miguelgrinberg/flasky.git 试着 ...
- 深入理解git,从研究git目录开始
转发学习的啦. 似乎很少有人在读某个git快速教程的时候会说:“这个关于git的快速教程太酷了!读完了用起git来超级舒服,并且我一点也不怕自己会破坏什么东西.” 对git的初学者来说,刚接触git时 ...
- Git详解之三 Git分支
相关文档 — 更多 Git 基础培训.ppt GIT 使用经验.ppt GIT 介绍.pptx GIT 分支管理是一门艺术.docx Eclipse上GIT插件EGIT使用手册.docx git/gi ...
- [git]添加项目到git
写在前面 一直在想把代码托管到git上面,一直没有去研究,最近发现自己写的demo,好多都找不到了,实在是没办法了,耐下心研究了下git.这里通过添加了自己做的demo,算是也是学习下git的操作吧. ...
- git使用命令, 特别:git checkout -b a 与 git branch a区别
摘自: https://my.oschina.net/u/587974/blog/74341 创建分支: $ git branch mybranch 切换分支: $ git checkout mybr ...
- 将在本地创建的Git仓库push到Git@OSC
引用自:http://my.oschina.net/flan/blog/162189 在使用git 处理对android的修改的过程之中总结的.但不完善 Git push $ git push ori ...
随机推荐
- FastDFS 使用经验分享
原文:http://www.ttlsa.com/fastdfs/fastdfs-experience-sharing/ 应用背景 文件被上传到FastDFS后Storage服务端将返回的文件索引(FI ...
- MVC项目引用备注
新建空的WEB应用 MVC Nuget引用:Microsoft.AspNet.MvcMicrosoft.AspNet.Web.Optimization 可选删除 Microsoft.CodeDom.P ...
- 基于ACIS/HOOPS的3D应用开发简介 【转】
(整理) 平台: 造型引擎——ACIS 显示引擎——Direct3D/OpenGL/GDI 应用框架——HOOPS 组件关系图 ...
- Keras 最新《面向小数据集构建图像分类模型》
本文地址:http://blog.keras.io/building-powerful-image-classification-models-using-very-little-data.html ...
- python 常见细节知识点
1. a[::-1]翻转 设有一个元组或者列表 a = (1,2,3,4) b = [1,2,3,4] 则a[::-1]和b[::-1]的含义是将元组或列表的内容翻转 a[::-1] # 结果为(4, ...
- MBR结构解析与fdisk的bash实现
一.MBR结构解析 首先我们先介绍一些MBR的基本知识基础,再晾图片分析. MBR主要分为三大块各自是: 1.载入引导程序(446K) 2.分区表(64k) 3.标志结束位(2k) 载入引导程序:内容 ...
- PS 如何使用钢笔工具
1.钢笔工具属于矢量绘图工具,其优点是可以勾画平滑的曲线,在缩放或者变形之后仍能保持平滑效果. 2.钢笔工具画出来的矢量图形称为路径,路径是矢量的路径允许是不封闭的开放状,如果把起点与终点重合绘制就可 ...
- solaris软件管理 FTP
安装一些常用软件 一.应用程序与系统命令的关系: 系统命令文件位置在 /bin /sbin下面或为shell内部指令:完成对系统的基本管理工作:一般在字符操作界面中运行:一般包括命令字.命令选项和命令 ...
- caffe搭建--WINDOWS+VS2013下生成caffe并进行cifar10分类测试
http://blog.csdn.net/naaaa/article/details/52118437 标签: windowsvs2013caffecifar10 2016-08-04 15:33 1 ...
- hessian实战1
服务端: 1.新建MAVEN HessianServer 项目 2.新建接口 Basic public interface Basic { String hello(String name); Str ...