def tracking_branch(self) -> Union["RemoteReference", None]:
        """
        :return:
            The remote reference we are tracking, or ``None`` if we are not a tracking
            branch.
        """
        from .remote import RemoteReference

        reader = self.config_reader()
        if reader.has_option(self.k_config_remote) and reader.has_option(self.k_config_remote_ref):
            ref = Head(
                self.repo,
                Head.to_full_path(strip_quotes(reader.get_value(self.k_config_remote_ref))),
            )
            remote_refpath = RemoteReference.to_full_path(join_path(reader.get_value(self.k_config_remote), ref.name))
            return RemoteReference(self.repo, remote_refpath)
        # END handle have tracking branch

        # We are not a tracking branch.
        return None

        :return:
            The remote reference we are tracking, or ``None`` if we are not a tracking
            branch.
        
git/refs/head.py