def command_git_cmd(path, git_cmd, chdir, block)
      out = nil
      if chdir and (Dir.getwd != path)
        Dir.chdir(path) { out = run_command(git_cmd, &block) }
      else
        out = run_command(git_cmd, &block)
      end
      return out
    end
def command_git_cmd(path, git_cmd, chdir, block)
      out = nil
      if chdir and (Dir.getwd != path)
        Dir.chdir(path) { out = run_command(git_cmd, &block) }
      else
        out = run_command(git_cmd, &block)
      end
      return out
    end
Executes the given git command

 @param [String] path the directory to run the command in
 @param [String] git_cmd the CLI command to execute
 @param [Boolean] chdir should the shell change to the top of the working dir before executing the command?
 @param [Proc] block the block to run in the context of running the command

 @return [String] the output of the git command