code: def upstream(self):
          
          cmd = ["git", "remote", "get-url", "upstream"]
          try:
              subprocess.check_output(cmd, stderr=subprocess.DEVNULL)
          except subprocess.CalledProcessError:
              return "origin"
          return "upstream"
docs: Get the remote name to use for upstream branches
          Uses "upstream" if it exists, "origin" otherwise