Moved Git commands to a separate helper class for reuse.