Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
spread each git commits to branches
#! /usr/bin/env ruby
i = 1
`git log --reverse --oneline` { |commit|
}.each { |ref|
system(sprintf("git branch %02d_%s %s", i, ref, ref))
i += 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment