Skip to content

Instantly share code, notes, and snippets.

View youknowjack's full-sized avatar

Jack Humphrey youknowjack

View GitHub Profile
@youknowjack
youknowjack / git-blob-ids.sh
Last active November 27, 2023 17:23
A bash script to list blobs (hash id and path) in a git repo
#!/bin/bash
#
# git-blob-ids: List blobs (hash id and path) in a git repo
#
# Usage: git-blob-ids [-s] [-r REF] [-p PATH]
#
# -r REF an optional reference to a commit (hash or symbolic like HEAD), default: HEAD
# -p PATH an option path to a subtree in repo, default is blank for root tree
# -s shortens blob hash ids to 6 characters
#