ported shared code to git-lib.sh
ported shared code to git-lib.sh