use find instead of each to stop loop
update git command to get reference