def METHOD_NAME(self, *, refs=["refs/heads", "refs/remotes"]):
    # type: (Sequence[str]) -> List[Branch]
    """
    Return a list of all local and remote branches.
    """
    stdout = self.git(
        "for-each-ref",
        (
            "--format="
            "%(HEAD)%00"
            "%(refname)%00"
            "%(upstream)%00"
            "%(upstream:remotename)%00"
            "%(upstream:track,nobracket)%00"
            "%(committerdate:unix)%00"
            "%(objectname)%00"
            "%(contents:subject)"
        ),
        *refs
    )  # type: str
    branches = [
        branch
        for branch in (
            self._parse_branch_line(line)
            for line in filter_(stdout.splitlines())
        )
        if branch.name != "HEAD"
    ]
    store.update_state(self.repo_path, {"branches": branches})
    return branches