Skip to content

Instantly share code, notes, and snippets.

@avescodes
Created January 12, 2009 01:53
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 avescodes/45851 to your computer and use it in GitHub Desktop.
Save avescodes/45851 to your computer and use it in GitHub Desktop.
Quick little git repo editor
#!/opt/local/bin/ruby -w
require 'YAML'
# Example ~/.git_repos :
# repos:
# - "~/dev/gh/joust"
# - "~/dev/gh/joust/meta"
config = YAML.load_file(ENV['HOME'] + "/.git_repos")
config['repos'].each do |f|
f.gsub!('~',ENV['HOME'])
puts "Updating #{f.split('/')[-1]}"
puts "\t#{`cd #{f}; git pull`}"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment