fix warning if you are in .git directory