Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

git log of a single revision

Tags:

git

git-log

People also ask

How do I search for commits done by a particular author?

So for looking for commits by “Adam Dymitruk” it's easier to just type git log --author="Adam" or use the last name if there more contributors with the same first name.

How can I see only my commits?

You should use the --author flag to the git-log command. You could then just type: git mylog and see your commits only.


You can use show:

git show commit_id

Michal Trybus' answer is the best for simplicity. But if you don't want the diff in your output you can always do something like:

git log -1 -U c

That will give you the commit log, and then you'll have full control over all the git logging options for your automation purposes. In your instance you said you wanted the change-set. The most human-readable way to accomplish that would be:

git log --name-status --diff-filter="[A|C|D|M|R|T]" -1 -U c

Or, if you're using a git version greater than 1.8.X it would be:

git log --name-status --diff-filter="ACDMRT" -1 -U c

This will give you results similar to:

commit {c}
Author: zedoo <[email protected]>
Date: Thu Aug 2 {time-stamp}

   {short description}
D    zedoo/foo.py
A    zedoo/bar.py

Of course you can filter out whichever events you see fit, and format the return as you wish via the traditional git-log commands which are well documented here.


git log -p c -1 does just that .


You can use to filter change by description of commit:

git log --grep='part_of_description' -p

where git log --grep='part_of_description' select the commits that contains 'part_of_description' and -p show the changeset of each commit