Rename Local and Remote branch in git

Many time developers accidentally make a typo while naming the git branch locally and sometimes we push the code to remote git branch without realization. In this case you need to rectify the mistake...