How to get Git diff of the first commit?

You can do:

git diff 4b825dc642cb6eb9a060e54bf8d69288fbee4904 HEAD

4b825dc642cb6eb9a060e54bf8d69288fbee4904 is the id of the “empty tree” in Git and it’s always available in every repository.

Leave a Comment