Skip to content

Commit e779b3f

Browse files
Merge remote-tracking branch 'origin/master' into develop
2 parents 24b5569 + a720b6e commit e779b3f

File tree

1 file changed

+5
-10
lines changed

1 file changed

+5
-10
lines changed

README.md

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -39,19 +39,20 @@ like:
3939

4040
Here are a bunch of examples of how to use the Ruby/Git package.
4141

42-
First you have to remember to require rubygems if it's not. Then include the 'git' gem.
42+
Ruby < 1.9 will require rubygems to be loaded.
4343

4444
```ruby
45-
4645
require 'rubygems'
47-
require 'git'
46+
```
4847

48+
Require the 'git' gem.
49+
```ruby
50+
require 'git'
4951
```
5052

5153
Here are the operations that need read permission only.
5254

5355
```ruby
54-
5556
g = Git.open(working_dir, :log => Logger.new(STDOUT))
5657

5758
g.index
@@ -124,13 +125,11 @@ Here are the operations that need read permission only.
124125
g.config # returns whole config hash
125126

126127
g.tag # returns array of Git::Tag objects
127-
128128
```
129129

130130
And here are the operations that will need to write to your git repository.
131131

132132
```ruby
133-
134133
g = Git.init
135134
Git.init('project')
136135
Git.init('/home/schacon/proj',
@@ -199,13 +198,11 @@ And here are the operations that will need to write to your git repository.
199198

200199
g.push
201200
g.push(g.remote('name'))
202-
203201
```
204202

205203
Some examples of more low-level index and tree operations
206204

207205
```ruby
208-
209206
g.with_temp_index do
210207

211208
g.read_tree(tree3) # calls self.index.read_tree
@@ -242,10 +239,8 @@ Some examples of more low-level index and tree operations
242239
# do file work
243240
g.commit # commits to index
244241
end
245-
246242
```
247243

248-
249244
## License
250245

251246
licensed under MIT License Copyright (c) 2008 Scott Chacon. See LICENSE for further details.

0 commit comments

Comments
 (0)