File tree Expand file tree Collapse file tree 1 file changed +25
-0
lines changed Expand file tree Collapse file tree 1 file changed +25
-0
lines changed Original file line number Diff line number Diff line change @@ -204,3 +204,28 @@ And here are the operations that will need to write to your git repository.
204
204
205
205
g.push
206
206
g.push(g.remote('name'))
207
+
208
+
209
+ Some examples of more low-level index and tree operations
210
+
211
+ g.with_temp_index do
212
+
213
+ g.read_tree(tree3) # calls self.index.read_tree
214
+ g.read_tree(tree1, :prefix => 'hi/')
215
+
216
+ c = g.commit_tree('message')
217
+ # or #
218
+ t = g.write_tree
219
+ c = g.commit_tree(t, :message => 'message', :parents => [sha1, sha2])
220
+
221
+ g.branch('branch_name').update_ref(c)
222
+ g.update_ref(branch, c)
223
+
224
+ g.with_temp_working do # new blank working directory
225
+ g.checkout
226
+ g.checkout(another_index)
227
+ g.commit # commits to temp_index
228
+ end
229
+ end
230
+
231
+ g.set_index('/path/to/index')
You can’t perform that action at this time.
0 commit comments