In a Git repository, where do your files live?
I realize the Python script is likely provided for didactic purposes, but you can use `git hash-object` to get the object ID:<p><a href="https:&#x2F;&#x2F;git-scm.com&#x2F;docs&#x2F;git-hash-object" rel="nofollow noreferrer">https:&#x2F;&#x2F;git-scm.com&#x2F;docs&#x2F;git-hash-object</a><p>With a bit of sed, the python script in the blog post becomes:<p><pre><code>  git hash-object &lt;path&gt; | sed -E &#x27;s|(..)(.*)|.git&#x2F;objects&#x2F;\1&#x2F;\2|&#x27;
</code></pre>
The inverse of `git hash-object` is `git cat-file`:<p><pre><code>  git cat-file -p $(git hash-object &lt;path&gt;)
</code></pre>
<a href="https:&#x2F;&#x2F;git-scm.com&#x2F;docs&#x2F;git-cat-file" rel="nofollow noreferrer">https:&#x2F;&#x2F;git-scm.com&#x2F;docs&#x2F;git-cat-file</a><p>Aside, when I learn a new subject, I like to go to the index such that it is to get an idea of what I don&#x27;t know (first stage of learning: you don&#x27;t know what you don&#x27;t know). Then I can try to prioritize the order of learning about the topic. With git, I&#x27;d start with this page:<p><a href="https:&#x2F;&#x2F;git-scm.com&#x2F;docs&#x2F;git" rel="nofollow noreferrer">https:&#x2F;&#x2F;git-scm.com&#x2F;docs&#x2F;git</a>