Skip to content

Instantly share code, notes, and snippets.

@swdyh
Created January 27, 2009 17:54
Show Gist options
  • Select an option

  • Save swdyh/53445 to your computer and use it in GitHub Desktop.

Select an option

Save swdyh/53445 to your computer and use it in GitHub Desktop.
#!/usr/bin/env ruby
# http://unknownplace.org/memo/2009/01/27#e001
# http://gist.github.com/53293
require 'rubygems'
require 'gisty'
files = Dir.glob('*', File::FNM_DOTMATCH).reject { |i| File.directory?(i) }
url = Gisty.new(Dir.pwd).create files
repo = url.split('/').last + '.git'
system "git remote add origin git@gist.github.com:#{repo}"
system "git pull origin master"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment