Skip to content

Instantly share code, notes, and snippets.

@dleavitt
Created December 14, 2013 23:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dleavitt/7966550 to your computer and use it in GitHub Desktop.
Save dleavitt/7966550 to your computer and use it in GitHub Desktop.
Bulk rename git feature branches to "old" branches
%x{git branch | grep feature}.split("\n").map(&:strip).map {|o| [o, o.gsub(/^feature\//, "old/")] }.map {|(o, n)| %x{git branch -m #{o} #{n}} }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment