remove .git from basename to get dir name