git = (commands, repoPath, allowError, outPipe, inPipe, timeout) => {
  let args = {};
  if (Array.isArray(commands)) {
    args.commands = commands;
    args.repoPath = repoPath;
    args.outPipe = outPipe;
    args.inPipe = inPipe;
    args.allowError = allowError;
    args.timeout = timeout;
  } else {
    args = commands;
  }

  args.commands = gitConfigArguments.concat(
    args.commands.filter((element) => {
      return element;
    })
  );
  args.timeout = args.timeout || 2 * 60 * 1000; // Default timeout tasks after 2 min
  args.startTime = Date.now();

  return gitExecutorProm(args, config.lockConflictRetryCount);
}
Returns a promise that executes git command with given arguments.

@function
@param {Object | string[]} commands    - An object that represents all parameters or first
                                       parameter only, which is an array of commands.
@param {string}            repoPath    - path to the git repository.
@param {boolean=}          allowError  - true if return code of 1 is acceptable as some cases
                                       errors are acceptable.
@param {WritableStream=}   outPipe     - if this argument exists, stdout is piped to this object.
@param {ReadableStream=}   inPipe      - if this argument exists, data is piped to stdin process
                                       on start.
@param {number=}           timeout     - execution timeout, default is 2 mins.
@returns {promise} Execution promise.
@example

  getGitExecuteTask({ commands: ['show'], repoPath: '/tmp' });

@example

  getGitExecuteTask(['show'], '/tmp');