git: rename a branch [locally and remotely]

JavaScript Jan 29, 2016

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:


Riccardo Coppola

I help companies with creating better web applications. Certified Level 3 Personal trainer, nutrition geek and biohacker, trained barista and (very) amateur photographer.