function getCurrentBranchSafe() {
  try {
    return getCurrentBranch();
  } catch (err) {
    return undefined;
  }
}
Returns the current branch name. Returns `undefined` if it could not be determined.
@return {string|undefined}