创建Git提交并使用Ruby推送到GitHub [英] Create Git commits and push to GitHub with Ruby
问题描述
我正在开发一个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屋!