Last active
December 12, 2015 01:48
-
-
Save dangra/4693361 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# GistID: 4693361 | |
rm -rf scrapyd | |
git clone scrapy scrapyd | |
( | |
cd scrapyd | |
git remote rm origin | |
echo 0.7 0.7-rc1 0.8 0.9 0.9-rc1 0.10-rc1 |xargs git tag -d | |
git filter-branch \ | |
--prune-empty \ | |
--tag-name-filter cat \ | |
--index-filter ' | |
git ls-files -s \ | |
| sed "s-\t-&scrapyd/-" \ | |
| GIT_INDEX_FILE=$GIT_INDEX_FILE.new git update-index --index-info \ | |
&& mv $GIT_INDEX_FILE.new $GIT_INDEX_FILE' \ | |
--subdirectory-filter scrapyd \ | |
-- --all | |
du -sh . | |
git reset --hard | |
git for-each-ref --format="%(refname)" refs/original/ | xargs -n 1 git update-ref -d | |
git reflog expire --expire=now --all | |
git gc --aggressive --prune=now | |
du -sh . | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment