Finds the corresponding log according to the specified commit

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.