I know that git stores files as SHA-1 hashes, but it also tracks the names of files.
In a bare repository where can I see this information.
For example I can look at the files in objects like this: Here is 4 files in my initial push under objects/
I know that git stores files as SHA-1 hashes, but it also tracks the names of files.
In a bare repository where can I see this information.
For example I can look at the files in objects like this: Here is 4 files in my initial push under objects/
You can issue
git cat-file -p HEAD^{tree}
This lists the (root) tree of your latest commit. The third column represents the object id. The first two chars of it represent the folder name and the rest the filename for unpackaged objects in .objects. Blob are files and tree is a subtree (a subfolder, you can see it by issuing git cat-file -p [OBJECTID]^{tree} where [OBJECTID] is the charsequence of the third column.)
(when using Windows you might need to replace ^ with ^^)
See https://git-scm.com/book/en/v2/Git-Internals-Git-Objects for more information how Git stores files and objects.