Git has a well-known, or at least sort-of-well-known, empty tree whose SHA1 is:
4b825dc642cb6eb9a060e54bf8d69288fbee4904
(you can see this in
Here is the answer on how to create empty tree commit even in the case when the repository is not already empty. https://stackoverflow.com/a/14623458/9361507
But I prefer "empty" to be tag, but not a branch. Simple way is:
git tag empty $(git hash-object -t tree /dev/null)
Because tag can point to tree-ish directly, without commit. Now to get all the files in the working tree:
git diff --name-only empty
Or the same with stat:
git diff --stat empty
All files as diff:
git diff empty
Check whitespaces in all files:
git diff --check empty