Created
June 4, 2018 17:19
-
-
Save gvJaime/893953a990b0dd93c13af485cdb3a3ce to your computer and use it in GitHub Desktop.
REMOVE GIT LFS
This file contains hidden or 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 -f --prune-empty --tree-filter ' | |
if [ -f .gitattributes ]; then | |
git rm -f .gitattributes | |
fi | |
find * -type f | while read FILE; do | |
while head -2 "$FILE" | grep -q "^oid sha256"; do | |
ref=$(cat "$FILE") | |
echo -n "$ref" | git lfs smudge > "$FILE" | |
git add "$FILE" | |
done | |
done' --tag-name-filter cat -- --all |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment