Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Git: How to get the commit info of a changeset

Tags:

git

I got a changeset after digging around with git blame. Now I want to know more about the changeset. The changes made and comments,etc etc.

What is the git command to get that information?

Looked around, but could not find the answer that I was looking for.

like image 553
prakash Avatar asked Jul 15 '11 22:07

prakash


People also ask

How do you see the details of a commit?

`git log` command is used to view the commit history and display the necessary information of the git repository. This command displays the latest git commits information in chronological order, and the last commit will be displayed first.

How can I see the code of a previous commit?

All that you have to do is go on to the file that you committed on and go to the history for it, then select the earliest commit with the <> icon to view the code at that time.

How do I read a commit message?

git log -1 will display the latest commit message or git log -1 --oneline if you only want the sha1 and associated commit message to be displayed. Show activity on this post. Show activity on this post. Show activity on this post.


1 Answers

Maybe git show?

It gives you the commit sha, the author, the comment and a complete diff of that commit. If you need you can also specify multiple changeset using this syntax.

like image 92
Fabio Avatar answered Sep 25 '22 20:09

Fabio