Last Updated: February 25, 2016
·
486
· glaszig

Fixing Xcode's template headers after git commit

Ever created a new file in Xcode, hacked right away and git commit'ed wrong user and/or company name in the file's header?

You can filter your branch, replacing stuff:

git filter-branch --tree-filter 'find . \( -name \*.m -o -name \*.h \) -exec sed -i "" -e "s/Your Oldname/Your Newname/" {} \;' HEAD

Beware: Don't do this after you shared your code. Mates might get mad.