Add git commits and chec if a dir is a repo