docs: function genCommit(env, msg, ns, prevVer, noVerbose) {
  	if (!noVerbose) {
  		var gmsg = typeof msg === 'string' ? msg + '\n'
  				: typeof msg === 'undefined' ? 'Global environment available via releasebot.config("' + envNS + '"):\n'
  						: msg;
  		if (gmsg) {
  			rbot.log.verbose(gmsg + util.inspect(env, {
  				colors : true,
  				depth : 3
  			}));
  		}
  	}
  	// use global commit to prevent duplicate lookups
  	var gc = getCommit();
  	/*
  	 * rbot.log.verbose(gc ? 'Global commit\n' + util.inspect(gc, { colors :
  	 * true, depth : 3 }) : 'no global commit set yet...');
  	 */
  	var ch = gc ? gc.hash : env.hash;
  	var cm = env.commitMessage ? env.commitMessage : gc ? gc.message : null;
  	var br = gc ? gc.branch : env.branch;
  	var rs = gc ? gc.slug : env.repoSlug;
  	var pver = prevVer ? prevVer : gc && gc.prev ? gc.prev.version : null;
  	var un = '', rn = '';
  	if (!gc) {
  		rbot.log.verbose('Searching for commit details...');
  	}
  	function cmd(c) {
  		var rtn = execCmd(c, env.gitCliSubstitute);
  		if (rtn.code !== 0) {
  			var e = new Error('Error "' + rtn.code + '" for ' + c + ' ' + rtn.output);
  			rbot.log.error(e);
  			throw e;
  		}
  		return rtn.output.replace(regexLines, '');
  	}
  	function sur(s) {
  		var ss = s.split('/');
  		un = ss[0];
  		rn = ss[1];
  		rs = s;
  	}
  	function smv(cm, rx, pv) {
  		if (!util.isRegExp(rx)) {
  			return cm;
  		}
  		return cm.replace(rx, function relSemver(m, lbl, sep, typ, rel) {
  			return lbl + sep + typ + semver.inc(pv, rel);
  		});
  	}
  	if (!br) {
  		br = cmd('git rev-parse --abbrev-ref HEAD');
  		rbot.log.verbose('Found branch: "' + br + '"');
  	}
  	if (!ch) {
  		ch = cmd('git rev-parse HEAD');
  		rbot.log.verbose('Found commit hash: "' + ch + '"');
  	}
  	if (!cm) {
  		// fall back on either last commit message or the commit message for
  		// the current commit hash
  		cm = cmd("git show -s --format=%B " + env.commitHash);
  		rbot.log.verbose('Found commit message: "' + cm + '"');
  	}
  	if (!rs) {
  		// fall back on capturing the repository slug from the current
  		// remote
  		rs = cmd("git ls-remote --get-url");
  		rs.replace(regexSlug, function(m, s) {
  			sur(s);
  			rs = s;
  		});
  		if (rs) {
  			rbot.log.verbose('Found repo slug: "' + rs + '"');
  		}
  	} else {
  		sur(rs);
  	}
  	if (!pver) {
  		pver = execCmd('git describe --abbrev=0 --tags', env.gitCliSubstitute);
  		var lverno = false;
  		if (pver.code !== 0) {
  			var pvmire = util.isRegExp(env.prevVersionMsgIgnoreRegExp);
  			if (pvmire) {
  				env.prevVersionMsgIgnoreRegExp.lastIndex = 0;
  				lverno = env.prevVersionMsgIgnoreRegExp.test(pver.output);
  				pvmire = lverno;
  			}
  			if (!pvmire) {
  				throw new Error('Error capturing previous release version ' + pver.output);
  			}
  		}
  		if (!lverno && pver.output) {
  			pver = pver.output.replace(regexVerLines, '');
  			rbot.log.info('Found previous release version "' + pver + '" from git');
  		} else {
  			pver = '';
  			var pkg = rbot.file.readJSON(env.pkgPath);
  			if (pkg.version) {
  				pver = pkg.version;
  				rbot.log.info('Found previous release version "' + pver + '" from ' + env.pkgPath);
  			} else {
  				var pve = 'Missing version from "' + env.pkgPath + '" using ' + pver;
  				rbot.log.fail(pve);
  				throw new Error(pve);
  			}
  		}
  	}
  	if (cm) {
  		// replace any release or bump version templates with the incremented
  		// versions from the semver (should be performed before explicit check)
  		cm = smv(cm, env.releaseVersionSemverIncRegExp, pver);
  		cm = smv(cm, env.bumpVersionSemverIncRegExp, pver);
  	}
  	var c = new Commit(env.releaseVersionDefaultLabel, env.releaseVersionDefaultType, env.releaseVersionRegExp,
  			env.bumpVersionRegExp, cm, pver, true, env.gitCliSubstitute, ch, env.pkgPath, env.pkgPathBower,
  			env.pkgPropSync, env.buildDir, br, rs, un, rn, env.gitToken, env.npmToken);
  	cloneAndSetCommit(c, msg, ns, noVerbose);
  	return c;
  }