fix bug for .git repo