git: rename a branch [locally and remotely]

It happens to me quite a lot: I create a branch and then want to rename it to a more specific/correct name. 
 If that branch has already been pushed to a remote, this operation is a bit trickier than the usual renaming.

I’ve found this nice gist from lttlrck and thought I’d share it:


Originally published at on January 29, 2016.

One clap, two clap, three clap, forty?

By clapping more or less, you can signal to us which stories really stand out.