Created
February 29, 2012 14:09
-
-
Save wtnabe/1941119 to your computer and use it in GitHub Desktop.
spread each git commits to branches
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/env ruby | |
i = 1 | |
`git log --reverse --oneline`.lines.map { |commit| | |
commit.chomp.split(/\s+/).first | |
}.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