I want to rewrite the git history of my repository with git-filter-branch to replace all occurrences of "foo.bar" with "bar.foo" in all files.
How can I achieve this?
Update:
I've being playing with the --tree-filter parameter and I've been able to replace the word in a specified file with this:
git filter-branch -f --tree-filter '
if [ -f testfile ]
then
sed -i s/foo.bar/bar.foo/g testfile
fi ' -- --all
This seems to be the closest I can get to achieve what I wanted.