added git repo feature; need to optimize a little bit