J: Just citing the book - M: My conversion from theory to practice (1) - CR: Created - LU: Last Updated. (YYYY-MM-DD HH:MM:SS GMT).
cat-filecommand with the
-poption prints the object given on the command line" ("Git's objects" section)
For a large project with thousands of files, I was interested in discovering which files within a directory were being tracked by my Git repository. My first step was to find the ID/SHA-1 of the directory, which was
7f21f0619053f44762c16a2707d845697e99a1f1. Then I ran the following command:
git cat-file -p 7f21f0619053f44762c16a2707d845697e99a1f1. The result was the list of everything that was being tracked by Git, including both files and directories. Then I could conclude that anything that was present in that directory but that did not appear in the list returned by the command, was not being tracked by Git. CR: 2018-10-18 00:43:12 LU: 2018-10-18 00:47:29 Permalink: https://twitter.com/jaimemontoyacom/status/1077212516185456643