The previous answers are all good, but they all show origin/master. These days, following the best practices, I rarely work directly on a master branch, let alone from origin repo.
So if you are like me who work in a branch, here are tips:
- Say you are already on a branch. If not, git checkout that branch
- git log # to show a list of commit such as x08d46ffb1369e603c46ae96, You need only the latest commit which comes first.
- git show --name-only x08d46ffb1369e603c46ae96 # to show the files commited
- git show x08d46ffb1369e603c46ae96 # show the detail diff of each changed file
Or more simply, just use HEAD:
- git show --name-only HEAD # to show a list of files committed
- git show HEAD # to show the detail diff.