@@ -13,7 +13,7 @@ http://github.com/schacon/ruby-git
1313You can install Ruby/Git like this:
1414
1515 $ sudo gem install git
16-
16+
1717## Code Status
1818
1919* [ ![ Build Status] ( https://api.travis-ci.org/schacon/ruby-git.png )] ( https://travis-ci.org/schacon/ruby-git )
4646
4747Here are a bunch of examples of how to use the Ruby/Git package.
4848
49- Ruby < 1.9 will require rubygems to be loaded.
49+ Ruby < 1.9 will require rubygems to be loaded.
5050
5151``` ruby
5252 require ' rubygems'
@@ -127,10 +127,10 @@ Here are the operations that need read permission only.
127127 g.grep(' hello' ) # implies HEAD
128128 g.blob(' v2.5:Makefile' ).grep(' hello' )
129129 g.tag(' v2.5' ).grep(' hello' , ' docs/' )
130- g.describe()
130+ g.describe()
131131 g.describe(' 0djf2aa' )
132132 g.describe(' HEAD' , {:all => true , :tags => true })
133-
133+
134134 g.diff(commit1, commit2).size
135135 g.diff(commit1, commit2).stats
136136 g.gtree(' v2.5' ).diff(' v2.6' ).insertions
@@ -149,7 +149,7 @@ Here are the operations that need read permission only.
149149 g.config # returns whole config hash
150150
151151 g.tags # returns array of Git::Tag objects
152-
152+
153153 g.show()
154154 g.show(' HEAD' )
155155 g.show(' v2.8' , ' README.md' )
@@ -178,9 +178,11 @@ And here are the operations that will need to write to your git repository.
178178 g.add(' file_path' ) # git add -- "file_path"
179179 g.add([' file_path_1' , ' file_path_2' ]) # git add -- "file_path_1" "file_path_2"
180180
181-
182- g.remove(' file.txt' )
183- g.remove([' file.txt' , ' file2.txt' ])
181+ g.remove() # git rm -f -- "."
182+ g.remove(' file.txt' ) # git rm -f -- "file.txt"
183+ g.remove([' file.txt' , ' file2.txt' ]) # git rm -f -- "file.txt" "file2.txt"
184+ g.remove(' file.txt' , :recursive => true ) # git rm -f -r -- "file.txt"
185+ g.remove(' file.txt' , :cached => true ) # git rm -f --cached -- "file.txt"
184186
185187 g.commit(' message' )
186188 g.commit_all(' message' )
0 commit comments