根据指定的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文件中
作者:Chuck Lu GitHub |
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 记一次.NET内存居高不下排查解决与启示
· 探究高空视频全景AR技术的实现原理
· 理解Rust引用及其生命周期标识(上)
· 浏览器原生「磁吸」效果!Anchor Positioning 锚点定位神器解析
· 没有源码,如何修改代码逻辑?
· 全程不用写代码,我用AI程序员写了一个飞机大战
· DeepSeek 开源周回顾「GitHub 热点速览」
· MongoDB 8.0这个新功能碉堡了,比商业数据库还牛
· 记一次.NET内存居高不下排查解决与启示
· 白话解读 Dapr 1.15:你的「微服务管家」又秀新绝活了