Refactor common repo init
Filter-branch: match git's reflog messages