根据指定的commit查找对应的log
find commit by hash sha in git
问题:
I need to find a commit in Git by given hash SHA. For example, if I have "a2c25061" hash, and I need to get the author and the committer of this commit.
What is the command to get that?
回答:
Just use the following command
git show a2c25061
举例:
supersocket中v1.6分支上,查找5db9e34
Administrator@LuJunTao MINGW64 /d/SourceCode/SuperSocket (demo|REBASE 1/6)
$ git show 5db9e34
commit 5db9e3407123bfb7a377dba59cb47748b37cef25
Author: Kerry Jiang <kerry-jiang@hotmail.com>
Date: Wed Aug 19 23:50:28 2015 +0800
fixed the bug m_CurrentSourceCount was not updated in SmartPool
diff --git a/Common/SmartPool.cs b/Common/SmartPool.cs
index 2b01ea2..639456f 100644
--- a/Common/SmartPool.cs
+++ b/Common/SmartPool.cs
@@ -332,7 +332,7 @@ namespace SuperSocket.Common
var newItemsCount = Math.Min(m_TotalItemsCount, m_MaxPoolSize - m_TotalItemsCount);
T[] items;
- m_ItemsSource[m_CurrentSourceCount] = m_SourceCreator.Create(newItemsCount, out items);
+ m_ItemsSource[m_CurrentSourceCount++] = m_SourceCreator.Create(newItemsCount, out items);
m_TotalItemsCount += newItemsCount;
git show显示的时间,标明了时区。
tortoisegit在日志中显示的时候,直接转换成了LocalTime
将git show的内容直接导出到文件中
git show f258 >./f258.txt 将文件导出到当前目录下的f258.txt文件中
根据指定的commit查找对应的log的更多相关文章
- linux find-在指定目录下查找文件
推荐:更多Linux 文件查找和比较 命令关注:linux命令大全 find命令用来在指定目录下查找文件.任何位于参数之前的字符串都将被视为欲查找的目录名.如果使用该命令时,不设置任何参数,则find ...
- git合并分支上指定的commit
merge 能够胜任平常大部分的合并需求.但也会遇到某些特殊的情况,例如正在开发一个新的功能,线上说有一个紧急的bug要修复.bug修好了但并不像把仍在开发的新功能代码也提交到线上去.这时候也许想要一 ...
- python 指定字符串位置查找
指定字符串位置查找 #指定字符查找 s = 'F:/my_pycharm/pycharm_project/CSV表格/10.csv' print(s.find('/')) # 2, 第一个/在2位置 ...
- Commit message 和 Change log 编写指南
来源:http://www.ruanyifeng.com/blog/2016/01/commit_message_change_log.html Git 每次提交代码,都要写 Commit messa ...
- Git回滚到指定的commit
查看历史commint $ git log (可以记下sha码) 回退命令: $ git reset --hard HEAD^ 回退到上个版本$ git reset --hard HEAD~3 回退到 ...
- [Practical Git] Filter commit history with git log arguments
In the last lesson, we learned how to format the git log output; in this lesson we will learn how to ...
- [Practical Git] Format commit history with git log arguments
When running the git log command, we can pass in options as arguments toformat the data shown for ea ...
- 如何指定vim 的查找是从上往下还是从下往上[z]
vim 搜索可以是 / 或者 ?,前者是往下找,后者是往前找. 用 n 查找下一个的时候,就和这两个指令指定的方向相同.如果你想改变方向的话,比如想往下找,那么 / 完了直接回车就行了.表示再次使用上 ...
- 利用grep命令查找字符串分析log文件的一次实践
需求场景: 我需要分析一个服务器访问日志,分析百度蜘蛛这个月对求索网页面的抓取情况. 分析问题: 我的一个access.log文件大小有35M,不可能直接通过打开查看.我需要过滤掉一些没有的信息,只保 ...
随机推荐
- iOS常见的设计模式
ios开发学习中,经常弄不清楚ios的开发模式,今天我们就来进行简单的总结和探讨~ (一)代理模式 应用场景:当一个类的某些功能需要由别的类来实现,但是又不确定具体会是哪个类实现.优势:解耦合敏捷原则 ...
- java新手笔记21 接口
1.接口 package com.yfs.javase; public interface IDemo1 {//interface 接口 public /*abstract*/ void method ...
- css3中matrix函数的使用
scale(sx,sy)对应matrix(sx,0,0,sy,0,0) 拉伸 rotate(θ)对应matrix(cosθ,sinθ,-sinθ,cosθ,0,0) 旋转 skew(θx,θy)对 ...
- eclipse+PyDev 中报错"scrapy.spiders.Spider" ,可用"# @UndefinedVariable"压制.
# -*- coding:utf-8 -*- ''' Created on 2015年10月22日 (1.1) 例子来源: http://scrapy-chs.readthedocs.org/zh_C ...
- phantomjs server + highchart 在服务器端生成highchart图表图片
前言 当项目需要将一个highchart图表以邮件发送的时候,js+css形式的highcharts 图表肯定是不好做的,有查可以借助flash去执行js,但很麻烦,所以折中将highchart图表转 ...
- php远程读取json的方法
<?php /** * @author 懒人 <service@kuitao8.com> * @since 2.0 */ header("Content-type:text ...
- uploadify实现七牛云存储 显示上传进度+页面显示
准备: uploadify下载地址: http://www.uploadify.com/download/ 七牛 php-sdk开发指南: http://developer.qiniu.com/doc ...
- Poco库之XML操作
平台ubuntu14.04LTS Poco版本:Poco1.6.1 #include <Poco/DOM/Text.h>#include <Poco/DOM/Element. ...
- Windows API 常量定义
Windows 常量定义在winuser.h中可以找到,如果了安装了visual studio 2010,winuser.h所在目录为C:\Program Files (x86)\Microsoft ...
- C语言实现的顺序表
顺序表是用一段地址连续的存储单元依次存储数据元素的线性结构.顺序表可分为静态存储和动态存储,静态顺序表比较简单,数据空间固定,而动态顺序表可以动态增容,便于存放大量数据,现主要把动态的基本实现一下~此 ...