Skip to content

Instantly share code, notes, and snippets.

@mikalv
Last active April 8, 2023 06:31
Show Gist options
  • Star 4 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mikalv/70d2327eaa5634372a3efa9026004a01 to your computer and use it in GitHub Desktop.
Save mikalv/70d2327eaa5634372a3efa9026004a01 to your computer and use it in GitHub Desktop.

Git in depth

How it works

Commands of special interest

  • git verify-pack -v .git/objects/pack/pack-*.idx - Output data about the indexes
  • git show-index < .git/objects/pack/pack-*.idx - Output data about the indexes (more and other format than above)
  • git rev-list REFS - list all revs in a ref
  • find .git/objects -type f - get all object files
  • find .git/refs -type f - list all refs
  • git count-objects -v - list objects and types

Manuals worth looking into

Many, even hidden commands can be found @ git help -a

  • git-cat-file
  • git-ls-tree
  • git-show-ref
  • git-rev-list
  • git-upload-pack
  • git-show-index
  • git-unpack-objects
  • git-unpack-file
  • git-index-pack
  • git-fetch-pack
  • git-gc
  • git-fast-import
  • git-ls-files
  • git-pack-refs
  • git-index-pack
  • git-http-fetch
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment