-
-
Save DBasic/85433df9d4bea743d3af to your computer and use it in GitHub Desktop.
[git] filter git branch
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
str=$(cat <<'EOF' | |
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\ | |
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\ | |
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\ | |
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\ | |
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\ | |
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx | |
EOF | |
) | |
git filter-branch --tree-filter "find . -name '*.php' -exec sed -i '' -e 's/$str/**REMOVED**/g' {} \;" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment