Fix git directory issues