创建Git提交并使用Ruby推送到GitHub [英] Create Git commits and push to GitHub with Ruby

查看:209
本文介绍了创建Git提交并使用Ruby推送到GitHub的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开发一个Web应用程序,用户将修改一个文件(托管在GitHub上),并且应该能够直接保存到GitHub中。

我不需要处理这个客户端,所以服务器端的Ruby解决方案就没问题。我假设我需要使用某种GitHub API。



我会如何去做这件事?

一个href =https://github.com/schacon/ruby-git =nofollow> ruby​​ git gem 是你需要的。它可以通过本地或远程git仓库来实现任何你想要的任何事情,包括新的提交,差异,分支,标签,推送到GitHub,你可以命名它。


I am working on a web application where a user will modify a file (hosted on GitHub) and should have the ability to save directly to GitHub.

I don't need to handle this client-side so a server-side Ruby solution would be fine. I'm assuming I would need to work with some sort of GitHub API.

How would I go about doing this?

解决方案

The ruby git gem is what you need. It can do virtually anything you want with a local or remote git repository, including new commits, diffs, branches, tags, pushing to GitHub, you name it.

这篇关于创建Git提交并使用Ruby推送到GitHub的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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