Rename the branches name

Hello guys, i know this question has been asked but i am really struggling to follow up on the answers, i don’t know how to use the cmd git to perform edits, i am still taking my baby steps.
I copy pasted the commands written in the answer before its always giving out errors.

Thanks in advance.

Hi @AHF_2001
This should work. If you get an error, post the error so we can see where is the problem.

git branch -m <oldname> <newname>

Thanks for the reply.

fatal: not a git repository (or any of the parent directories): .git
This the error I get once I type that above into the git cmd.

So you are not in a folder with Git repository.

If you are looking to rename a branch in GitLab, not in your local copy, you need to clone the repository first, then rename the branch and then push.

Oh i see.
So I see the clone button, and it gives me two options either by https or ssh, which one?
After i copy the link where do i use it?