Unified calls to git commands through a helper function