Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
Rename multiple git branches from the command line
git branch | grep defects | awk '{original=$1; sub("defects","old-defects"); print original, $1}' | xargs -n 2 git branch -m
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment