Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Git: See my last commit

Tags:

git

I just want to see the files that were committed in the last commit exactly as I saw the list when I did git commit. Unfortunately searching for

git "last commit" log 

in Google gets me nowhere. And

git diff HEAD^..HEAD 

is not what I need, of course, since it spews the guts of the change too.

like image 459
Dan Rosenstark Avatar asked Feb 09 '10 18:02

Dan Rosenstark


People also ask

How can I see my last commit?

If you want to see what's happened recently in your project, you can use git log . This command will output a list of the latest commits in chronological order, with the latest commit first.

How do I see my git history?

Git file History provides information about the commit history associated with a file. To use it: Go to your project's Repository > Files. In the upper right corner, select History.


1 Answers

As determined via comments, it appears that the OP is looking for

$ git log --name-status HEAD^..HEAD 

This is also very close to the output you'd get from svn status or svn log -v, which many people coming from subversion to git are familiar with.

--name-status is the key here; as noted by other folks in this question, you can use git log -1, git show, and git diff to get the same sort of output. Personally, I tend to use git show <rev> when looking at individual revisions.

like image 143
Mike Seplowitz Avatar answered Sep 19 '22 18:09

Mike Seplowitz