0 votes
1 view
in DevOps and Agile by (20k points)

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.

1 Answer

0 votes
by (28.4k points)

In order to see the files that were committed in the last commit this command can be used: 

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

Here, --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. You can also use git show <rev> when looking at individual revisions.

Welcome to Intellipaat Community. Get your technical queries answered by top developers !


Categories

...