There are two possible states you can be when you might want to rename local branch in git.
When you want to rename current branch:
🖥️
git branch -m [newname]
When you want to rename other branches than your current branch:
🖥️
git branch -m [oldname] [newname]