Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

View a specific Git commit [duplicate]

Tags:

git

Possible Duplicate:
Get Information about a SHA-1 commit object?

I needed to check when a specific change was added to a file I'm working on, so I used the git blame command. From that I obtained the hash of the relevant commit. Is there a way to see the log notes of just that commit, using the hash? All the docs talk about how to look at the whole tree.

I realize could just do git log <filename>, but there are a lot of commits for the file, and I'm loathe to go through all of them looking for this one. A simple way to view the log notes would be appreciated.

like image 554
eykanal Avatar asked Oct 05 '11 15:10

eykanal


People also ask

How do you see changes in a specific commit?

Looking up changes for a specific commit If you have the hash for a commit, you can use the git show command to display the changes for that single commit. The output is identical to each individual commit when using git log -p .

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

2 Answers. Show activity on this post. git log --author=<pattern> will show the commit log filtered for a particular author. ( --committer can be used for committer if the distinction is necessary).

How can I see Unpushed commits?

We can view the unpushed git commits using the git command. It will display all the commits that are made locally but not pushed to the remote git repository.

How do I see 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.


1 Answers

git show <revhash> 

Documentation here. Or if that doesn't work, try Google Code's Git Documentation

like image 64
Graham Borland Avatar answered Oct 14 '22 03:10

Graham Borland