Added a helper function to cleanup git repositories