8

Possible Duplicate:
git hash-object on a directory?

It is said that the Git hash is a SHA-1 hash of all the files that are being tracked in that commit. It seems that we can see the hash value of the HEAD by using git rev-parse HEAD, but is there a way to see the hash value of the current working directory? (without doing a commit)

Community
  • 1
  • 1
nonopolarity
  • 146,324
  • 131
  • 460
  • 740

1 Answers1

8

No, because the commit ID is hashed from information based on the commit itself, such as the timestamp, description, and author names (in addition to the contents of the tree).

Greg Hewgill
  • 951,095
  • 183
  • 1,149
  • 1,285