How to get a list of all blobs in a repository in Git -
How do I list all versions of all files in the git repository?
(For listing, for example
Use this list The file can be used for the cat.
">
In this way, I get a list of SHAs and filenames for all the blobs in a repository:
$ Git rev-list --objects --all | Git cat-file - batch-check = '% (object name)% (objectp)% (rest)' | grep '^ [^] * blob' | cut-d
Note:
-
% (rest)
SHA of the nuclear format string object After the output the rest of the input line In this situation, this is the path to the other path name (tree and blob objects). -
grep
The purpose of the pattern is only the actual blobs , Are not a tree object that has the stringblob
anywhere in their path name.
Comments
Post a Comment