This repository is private.
All pages are served over SSL and all pushing and pulling is done over SSH.
No one may fork, clone, or view it unless they are added as a member.
Every repository with this icon (
) is private.
Every repository with this icon (
This repository is public.
Anyone may fork, clone, or view it.
Every repository with this icon (
) is public.
Every repository with this icon (
commit cbe5952ddb7eabace75e10edabe0397f715e7be6
tree 195ae0da8b34752ac17924f26239908f8b30042c
parent 21e2d7a32cc879c8e33ca50a7bc42b23b8b17e4d
tree 195ae0da8b34752ac17924f26239908f8b30042c
parent 21e2d7a32cc879c8e33ca50a7bc42b23b8b17e4d
git-ruby /
| name | age | message | |
|---|---|---|---|
| |
LICENSE | Sat Mar 08 17:54:39 -0800 2008 | [schacon] |
| |
README | Sat Mar 08 17:54:39 -0800 2008 | [schacon] |
| |
README.markdown | Tue Mar 11 10:54:45 -0700 2008 | [schacon] |
| |
Rakefile | Mon Mar 31 17:57:40 -0700 2008 | [schacon] |
| |
TODO | Mon Mar 31 10:56:28 -0700 2008 | [schacon] |
| |
bin/ | Mon Mar 31 17:57:40 -0700 2008 | [schacon] |
| |
lib/ | Mon Mar 31 17:57:40 -0700 2008 | [schacon] |
| |
tests/ | Mon Mar 31 17:57:40 -0700 2008 | [schacon] |
README.markdown
Git Library for Ruby
A pure ruby implementation of Git
Homepage
Git public hosting of the project source code and project wiki is at:
http://github.com/schacon/gitruby
Gitr
I have included a command line pure-ruby git client called 'gitr'
The following commands are available - they all will run in pure ruby, without forking out the the git binary. In fact, they can be run on a machine without git compiled on it.
Commands currently implemented:
- add
- commit
- log
- log-shas
- cat-file (treeish)
- rev-parse (treeish)
- branches
- ls-tree (tree)
Examples
Here are some of examples of how to use the Git-Ruby package.
First you have to remember to require rubygems if it's not. Then include the 'git-ruby' gem.
require 'rubygems'
require 'git-ruby'
g = GitRuby.open('my_project') # has a .git subdir
g.add('file')
g.commit('commit message')
g.log.each do |commit|
puts commit.sha
puts commit.message
puts commit.author.email
commit.gtree.children.each do |name, obj|
if obj.tree?
puts ['tree: ' name, obj.sha].join("\t")
end
if obj.blob?
puts ['blob: ' name, obj.sha].join("\t")
end
end
end




