How to rename local/remote branch in GIT

The first step is to checkout to branch which we want to rename and then:

To delete the old branch type this in terminal: