diff options
author | scott Chacon <schacon@agadorsparticus.(none)> | 2007-11-16 13:24:30 -0800 |
---|---|---|
committer | scott Chacon <schacon@agadorsparticus.(none)> | 2007-11-16 13:24:30 -0800 |
commit | bc60052b519b8b991e50b8ccb30f2b76ad125996 (patch) | |
tree | c7e50409f58e58c852793544a901850498c00f9b /doc/files/README.html | |
parent | be47ad8aea4f854fc2d6773456fb28f3e9f519e7 (diff) | |
download | third_party-ruby-git-bc60052b519b8b991e50b8ccb30f2b76ad125996.tar.gz third_party-ruby-git-bc60052b519b8b991e50b8ccb30f2b76ad125996.tar.xz third_party-ruby-git-bc60052b519b8b991e50b8ccb30f2b76ad125996.zip |
updated the docs
Diffstat (limited to 'doc/files/README.html')
-rw-r--r-- | doc/files/README.html | 42 |
1 files changed, 41 insertions, 1 deletions
diff --git a/doc/files/README.html b/doc/files/README.html index 69d8471..8776a1a 100644 --- a/doc/files/README.html +++ b/doc/files/README.html @@ -56,7 +56,7 @@ </tr> <tr class="top-aligned-row"> <td><strong>Last Update:</strong></td> - <td>Tue Nov 13 08:54:36 PST 2007</td> + <td>Fri Nov 16 11:43:31 PST 2007</td> </tr> </table> </div> @@ -305,6 +305,46 @@ And here are the operations that will need to write to your git repository. g.push g.push(g.remote('name')) </pre> +<p> +Some examples of more low-level index and tree operations +</p> +<pre> + g.with_temp_index do + + g.read_tree(tree3) # calls self.index.read_tree + g.read_tree(tree1, :prefix => 'hi/') + + c = g.commit_tree('message') + # or # + t = g.write_tree + c = g.commit_tree(t, :message => 'message', :parents => [sha1, sha2]) + + g.branch('branch_name').update_ref(c) + g.update_ref(branch, c) + + g.with_temp_working do # new blank working directory + g.checkout + g.checkout(another_index) + g.commit # commits to temp_index + end + end + + g.set_index('/path/to/index') + + g.with_index(path) do + # calls set_index, then switches back after + end + + g.with_working(dir) do + # calls set_working, then switches back after + end + + g.with_temp_working(dir) do + g.checkout_index(:prefix => dir, :path_limiter => path) + # do file work + g.commit # commits to index + end +</pre> </div> |