Git diff only show file names with changes

February 26, 2013

If you just want to see a list of files with changes in the .git repository you are in then just fire terminal up and run the following command.

git diff --name-only

For a more detailed view of all changed files:

git diff

For a detailed view of just one file:

git diff application/routes.php

Show all un-committed / un-tracked files

git ls-files --other --exclude-standard

Undo the last commit

git reset --hard HEAD^1

All pretty useful git diff commands.


About me

Hello! I'm David Heward, how are you going? I'm a Senior Devops/Build Engineer, specialising in AWS & Cloud Automation. Based in London. Strong 10+ year background in Software development. Have a read of my blog. Have a look at some of my working projects. Contact me at @davehewy or on Linkedin.