Skip to content

Instantly share code, notes, and snippets.

@stefanor
Created April 8, 2016 06:30
Show Gist options
  • Save stefanor/5fbd45c4a68351720be72ff898568e9a to your computer and use it in GitHub Desktop.
Save stefanor/5fbd45c4a68351720be72ff898568e9a to your computer and use it in GitHub Desktop.
cd /dev/shm
git clone --single-branch ~/git/yola/sitebuilderui
git remote rm origin
git update-ref -d refs/tags/pre-template-component-purge
git filter-branch --index-filter '
git ls-files -s \
| sed "s|\t.*/nabtext\.js$|\tnabtext/nabtext.js|" \
| GIT_INDEX_FILE=$GIT_INDEX_FILE.new git update-index --index-info \
&& mv "$GIT_INDEX_FILE.new" "$GIT_INDEX_FILE"' \
master
git update-ref -d refs/original/refs/heads/master
git filter-branch --prune-empty --subdirectory-filter nabtext master
git update-ref -d refs/original/refs/heads/master
git reflog expire --expire=now --all
git gc --prune=now --aggressive
$ du -chs .git/
116K .git/
116K total
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment