Skip to content

Instantly share code, notes, and snippets.

View itguy51's full-sized avatar

Rebecca Pruim itguy51

  • San Diego, California
View GitHub Profile
@itguy51
itguy51 / gist:1491937
Created December 18, 2011 00:37 — forked from cookbooks/gist:731502
Grit clone example
# Since Git is well structured, Grit uses a method missing (Grit::Git#method_missing) to 'systematically' execute Git commands:
require 'grit'
include Grit
gritty = Grit::Git.new('/tmp/filling-in')
gritty.clone({:quiet => false, :verbose => true, :progress => true, :branch => '37s'}, "git://github.com/cookbooks/cc-aws.git", "/tmp/cc-aws2")
# => "Initialized empty Git repository in /tmp/cc-aws2/.git/\n"
Dir.entries('/tmp/cc-aws2').size
#wellp.