Created
August 11, 2014 08:10
-
-
Save fujimura/9bbff53bab2854f59aff to your computer and use it in GitHub Desktop.
Import all git repo from old repositories directory to ghq
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
Dir['./*'] | |
.select {|d|File.directory? (d + "/.git") } | |
.map {|d| `cd #{d} ; git config remote.origin.url ; cd ../ `.chomp } | |
.reject {|u| u.empty? } | |
.each {|u| `ghq get #{u}` } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment