if you are in the branch which you want to rename then try this command
git branch -m new-name
Its error when there is no message in the queue