How to update the terraform tfstate files if I want to switch from local to gitlab as terraform backend

Replace this template with your information

the document (Infrastructure as Code with Terraform and GitLab | GitLab) introduces a way to use gitlab as terraform backend.

My problem is, I have run the terraform apply and the tfstate file has been gererated locally.

How can I update it to remote gitlab terraform backend?