code: def branch_exists(self, branch):
          
          try:
              git(self.gitdir, self.gitwd, "rev-parse", branch)
          except sh.ErrorReturnCode:
              return False
          return True
docs: Returns true or false depending on if a branch exists