Get the remote name to use for upstream branches
        Uses "upstream" if it exists, "origin" otherwise

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