Convert Git lib to return commands instead of execute