Skip to content

Instantly share code, notes, and snippets.

@betawax
Created July 27, 2022 18:05
Replace a string in the entire Git history
git filter-branch --tree-filter 'if [ -f README.md ]; then sed -i "s/foo/bar/g" README.md; fi' HEAD
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment