Created
September 5, 2023 21:54
-
-
Save diodonfrost/84c98580b84b16bb5a3d6d8c9dca5265 to your computer and use it in GitHub Desktop.
Replace a string in whole Git history
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
| # Replace the string "foo" by "bar" in all .yml files in the whole Git history | |
| git filter-branch -f --tree-filter "find . -type f -name '*.yml' -exec sed -i -e 's/foo/bar/g' {} \;" | |
| # Replace the string "foo" by "bar" in all files in the whole Git history | |
| git filter-branch -f --tree-filter "find . -type f -exec sed -i -e 's/foo/bar/g' {} \;" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment