Skip to content

Instantly share code, notes, and snippets.

@vdemeester
Created December 17, 2012 10:43
Show Gist options
  • Save vdemeester/4317363 to your computer and use it in GitHub Desktop.
Save vdemeester/4317363 to your computer and use it in GitHub Desktop.
One hell of a feature for git : Replace this to that in all xml and java file in the whole git history. It will rewrite history (but keeping commit date) so it is a bit dangerous ;-).
git filter-branch --tree-filter \
"find . -type f -iname '*.java' -o -iname '*.xml' \
-exec sed -i \
-e 's/this/that/g' {} \;"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment