Skip to content

Instantly share code, notes, and snippets.

@Andrew8xx8
Created April 26, 2013 11:13
Show Gist options
  • Select an option

  • Save Andrew8xx8/5466497 to your computer and use it in GitHub Desktop.

Select an option

Save Andrew8xx8/5466497 to your computer and use it in GitHub Desktop.
#!/bin/bash
TMP_DIR="/tmp/git-objects"
GIT_OBJECTS_PACKS_DIR="objects/pack/"
if [ ! -e $TMP_DIR ]; then
mkdir $TMP_DIR
fi
mv $GIT_OBJECTS_PACKS_DIR/* $TMP_DIR
for i in $TMP_DIR/*.pack; do
git unpack-objects -q -r < $i
done
rm $TMP_DIR/*
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment