How to list all clean files in a git repository?
-c –clean show only files without changes
How do I fetch/clone only a few branches using git-svn? Change git account in specific project Script to install and compile Python, Django, Virtualenv, Mercurial, Git, LessCSS, etc… on Dreamhost Is there an easy way to push git changes to a Subversion repository with more than one address? How do I clone/pull from GitHub, but push to Kiln? Should I worry about `git fsck` warning: “contains zero-padded file modes”
git status lists by default all ‘dirty’ files (i.e. files with changes) and untracked ones – which is fine.
But sometimes I need to display the complement – all (tracked) files without changes.
How do I accomplish this with git?
2 Solutions collect form web for “How to list all clean files in a git repository?”
this should do the trick:
$ git ls-files -m > /dev/shm/exclude && git ls-files | grep -v -x -f /dev/shm/exclude
Remember to delete the temporary file afterwards!
$ git ls-files -t | grep '^H'
The man page states that
-t is deprecated – but I didn’t find a better way. The alternatives the man page mentions does not seem to be sufficient for this problem.