corrected regex and variable subtitutions
re-added r prefix for ahead count of git commits