unify git code for going master
Merge pull request #22 from dsanz/git_improvements

unify git code for going master