How to list ALL git objects in the database?

Try git rev-list –objects –all Edit Josh made a good point: git rev-list –objects -g –no-walk –all list objects reachable from the ref-logs. To see all objects in unreachable commits as well: git rev-list –objects –no-walk \ $(git fsck –unreachable | grep ‘^unreachable commit’ | cut -d’ ‘ -f3) Putting it all together, to really … Read more

How do I list all the files in a commit?

Preferred Way (because it’s a plumbing command; meant to be programmatic): $ git diff-tree –no-commit-id –name-only -r bd61ad98 index.html javascript/application.js javascript/ie6.js Another Way (less preferred for scripts, because it’s a porcelain command; meant to be user-facing) $ git show –pretty=”” –name-only bd61ad98 index.html javascript/application.js javascript/ie6.js The –no-commit-id suppresses the commit ID output. The –pretty argument … Read more

How do I list all of the files in a commit?

Preferred Way (because it’s a plumbing command; meant to be programmatic): $ git diff-tree –no-commit-id –name-only -r bd61ad98 index.html javascript/application.js javascript/ie6.js Another Way (less preferred for scripts, because it’s a porcelain command; meant to be user-facing) $ git show –pretty=”” –name-only bd61ad98 index.html javascript/application.js javascript/ie6.js The –no-commit-id suppresses the commit ID output. The –pretty argument … Read more