Skip to content

Instantly share code, notes, and snippets.

@ayadim
Last active April 10, 2024 18:08
Show Gist options
  • Save ayadim/8af1c6ed0b35a6e40580552abe3c0e28 to your computer and use it in GitHub Desktop.
Save ayadim/8af1c6ed0b35a6e40580552abe3c0e28 to your computer and use it in GitHub Desktop.
#!/bin/bash
#This script will extract the content of all the objects in .git/objects
mkdir -p output
for folderName in $(ls .git/objects/);do
for object in $(ls .git/objects/$folderName/);do
git cat-file -p $folderName$object | tee "./output/$folderName--$object.txt"
done
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment