refactored git-lib with better underlying calls