Created
May 8, 2014 17:32
-
-
Save gdesatrigraha/d07a416a67fcd0fc8f1c to your computer and use it in GitHub Desktop.
remove a directory / files from all git commits
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
git filter-branch --prune-empty -d /dev/shm/scratch \ | |
--index-filter "git rm --cached -f -r --ignore-unmatch sreader/cms/static" \ | |
--tag-name-filter cat -- --all | |
git update-ref -d refs/original/refs/heads/master | |
git reflog expire --expire=now --all | |
git gc --prune=now | |
git push -f |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment