0

I want the git log of a single commit but without the diff.

So far this is the simplest solution:

git log -1 <commit>

It looks like I want the -<number> switch. From the man page:

-<number>, -n <number>, --max-count=<number>
    Limit the number of commits to output.

This is not an exact duplicate of either of the listed questions.

Brian Tompsett - 汤莱恩
  • 5,438
  • 68
  • 55
  • 126
David Cullen
  • 13,143
  • 4
  • 35
  • 60

2 Answers2

0

Did you try:

git log -n 1 --pretty=%B <treeish>
DavidN
  • 8,071
  • 2
  • 18
  • 21
0

You can try,

git log -n 1 --pretty=format:'%h %ad %s (%an)'

OR

git log -n 1 --pretty=format:"%h%x09%an%x09%ad%x09%s"
Always Sunny
  • 32,751
  • 7
  • 52
  • 86