Skip to content

Instantly share code, notes, and snippets.

@rilindo
Forked from cookbooks/gist:731502
Created December 13, 2011 20:25
Show Gist options
  • Save rilindo/1473728 to your computer and use it in GitHub Desktop.
Save rilindo/1473728 to your computer and use it in GitHub Desktop.
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
# => 10
@rilindo
Copy link
Author

rilindo commented Dec 13, 2011

Adding this to mine own for future use. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment