GIT-SHOW-INDEX(1)

๐Ÿ’… GIT-SHOW-INDEX(1) โ€” git-show-index, bestie edition ๐ŸŽ€

okay so real talk: git-show-index is a manual page from the Git Manual, and it's literally about showing packed archive index. she's niche, she's fast, she's the main character of exactly one very specific task, and i'm obsessed. let's get into it โœจ


โœจ NAME โœจ

git-show-index โ€” show packed archive index ๐Ÿฆ‹

like, she shows you the index. that's the whole vibe check. no cap.


๐ŸŒธ SYNOPSIS ๐ŸŒธ

git show-index [--object-format=<hash-algorithm>] < <pack-idx-file>

notice the < in there? that's your bestie redirecting the .idx file into her on stdin. she doesn't take a filename argument, she takes your stdin, periodt ๐Ÿ’…


๐Ÿซถ DESCRIPTION ๐Ÿซถ

okay so here's the tea ๐Ÿ“: she reads the .idx file for a Git packfile โ€” the kind made with git-pack-objects(1) or git-index-pack(1) โ€” straight from standard input, and then dumps its whole contents at you. iconic behavior honestly.

the output is one object per line, and every line has two or three space-separated columns:

  • the first column is the offset in bytes of the object within the corresponding packfile ๐Ÿ“
  • the second column is the object id of the object ๐Ÿ”‘
  • if the index version is 2 or higher, the third column contains the CRC32 of the object data ๐Ÿงฎ

and the order? the objects come out in the order in which they are found in the index file, which should be (in a correctly constructed file) sorted by object id. so if you see chaos in the ordering, that's not her being messy, that's the file being messy ๐Ÿ™ˆ

๐Ÿ’ก little side note from her: you can get more information on a packfile by calling git-verify-pack(1). BUT. and this is the slay part โ€” since this command considers only the index file itself, it's both faster and more flexible. lowkey the better deal, highkey the better deal, it's giving efficiency ๐ŸŒˆ

๐Ÿ’– OPTIONS ๐Ÿ’–

  • --object-format=<hash-algorithm> โ€” specify the given object format (hash algorithm) for the index file, bestie. the valid values are sha1 and (if enabled) sha256. the default is the algorithm for the current repository (set by extensions.objectFormat), or sha1 if no value is set or outside a repository. ๐ŸŽ€
โš ๏ธ Note: At present, there is no interoperability between SHA-256 repositories and SHA-1 repositories. like they do not talk to each other. separate friend groups. ๐Ÿ˜ญ

and now the historical lore drop ๐Ÿ“œ โ€” historically, we warned that SHA-256 repositories may later need backward incompatible changes when we introduce such interoperability features. today, we only expect compatible changes. furthermore, if such changes prove to be necessary, it can be expected that SHA-256 repositories created with today's Git will be usable by future versions of Git without data loss. so she's saying: breathe, it's fine, your repos are safe ๐Ÿซถ


๐Ÿ‘‘ GIT ๐Ÿ‘‘

part of the git(1) suite. one big happy family, and she's the cool cousin who only comes out for .idx files ๐Ÿ’œ


okay that's the whole page, you ate that ๐Ÿ’…โœจ

this lil manual page is brought to you by Git 2.56.0, dated 2026-09-27 โ€” go off, queen, see you in the next manpage ๐Ÿฆ‹๐ŸŽ€๐ŸŒธ

๐Ÿ“ฆ where this page comes from