Find commit by hash sha in Git
Problem:
I need to find a commit in Git by given hash SHA. For example, if I has "a2c25061" hash, and I need to get the author and the committer of this commit.
What's the command to get?
Reply:
Just Use the following command
git show a2c25061
Example:
SuperSocket on v1.6 Branch, find 5db9e34
[Email protected] Mingw64/d/sourcecode/supersocket (demo| REBASE 1/6)
$ git show 5db9e34
Commit 5db9e3407123bfb7a377dba59cb47748b37cef25
Author:kerry Jiang <[email protected]>
date:wed 19 23:50:28 2015 +0800
Fixed the bug M_currentsourcecount was wasn't 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 @@ -332,7 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;
Finds the corresponding log according to the specified commit