Grit的克隆方法是不确定的? [英] Grit's clone method is undefined?

查看:145
本文介绍了Grit的克隆方法是不确定的?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我最近开始研究一个使用git存储和ruby作为前端的项目。我的脚本的第一个版本使用ruby-git,虽然很简单,但还是可以的。当我需要对我的提交和日志做更具体的工作时,建议我采取勇气。不过,我早期的一个路障似乎无法克隆远程存储库。我发现使用Repository类的所有示例都创建一个本地存储库并通过源搜索我发现Grit的clone方法未定义。什么给了?



这是我的第一个StackOverflow问题,所以在此先感谢您的帮助。 方案

因为Git结构良好,所以Grit使用缺少的方法(Grit :: Git#method_missing)'系统'执行Git命令。



请参阅下面的链接以获取帮助您的示例。



https ://gist.github.com/731502


I've recently started working on a project that uses git for storage and ruby as a front-end. The first version of my script used ruby-git, which was ok though pretty simple. When I needed to do more specific work with my commits and logs it was recommended that I move to grit. However, I've a road block early on- grit seems incapable of cloning remote repositories. All examples I've found using the Repository class create a local repository and searching through the source I've found Grit's clone method is undefined. What gives?

This is my first StackOverflow question, so thanks in advance for any help.

解决方案

Since Git is well structured, Grit uses a method missing (Grit::Git#method_missing) to 'systematically' execute Git commands.

See link below for an example that should help you.

https://gist.github.com/731502

这篇关于Grit的克隆方法是不确定的?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆