Refactor Git commands into a new GitHelper