I worked on the git repository for some time and made some commits. I use documentation blocks in my php files, including my personal email address, for example:
Now I created a new email address and updated the documentation blocks, replacing the old address with the new one. But this change only applies to commit after where I changed the documentation.
How to completely remove the old email address from git history and replace all instances with the new address?
I tried using the git filter branch using this blog post but to no avail. I get the following result:
git filter-branch --tree-filter 'git ls-files -z "*.php" |xargs -0 perl -p -i -e "s# old-email@example.com # new-email@foobar.com #g"' -- --all Usage: git core\git-filter-branch [--env-filter <command>] [--tree-filter <command>] [--index-filter <command>] [--parent-filter <command>] [--msg-filter <command>] [--commit-filter <command>] [--tag-name-filter <command>] [--subdirectory-filter <directory>] [--original <namespace>] [-d <directory>] [-f | --force] [<rev-list options>...]
Could it be that special characters of email addresses (@ and.) Confuse the regular expression? Other than that, I have no idea what is happening; any help is appreciated!
Nic wortel
source share