git hash-object
git hash-object [-w] <file>
Risk: Safe
What it does
Prints the id Git gives a file's content.
When to use it
To see that the same content always gets the same id.
Example
$ git hash-object index.htmlPrint the blob id of index.html. Nothing is saved.
$ git hash-object -w notes.txtAlso save the content in Git as a blob.
Learn it in: Plumbing vs porcelain · Official docs