execute git commands properly