Skip to content

Instantly share code, notes, and snippets.

@edenwaith
Created February 9, 2015 17:27
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save edenwaith/3eb5c41c5a7d68449ec9 to your computer and use it in GitHub Desktop.
Save edenwaith/3eb5c41c5a7d68449ec9 to your computer and use it in GitHub Desktop.
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