#!/bin/sh -ex fullpath() { echo "`pwd`/$1"; } git init retro cd retro cp /usr/share/dict/words words.big chmod u+w words.big git add words.big git commit -m'Add big file without using git-fat' sort words.big > sorted.big git add sorted.big git commit -m'Add sorted file without using git-fat' cat > .gitattributes < words.big git commit -am'Truncated words.big and add .gitattributes' git fat init cat > .gitattributes < fat-files git filter-branch --index-filter "git fat index-filter $(fullpath fat-files) --manage-gitattributes" --tag-name-filter cat -- --all git log --stat git checkout HEAD^ rm * git checkout . ls -al # Set up place to push git checkout master cat > .gitfat <