summaryrefslogtreecommitdiff
path: root/doc/source/tutorial.rst
diff options
context:
space:
mode:
authorSebastian Thiel <byronimo@gmail.com>2015-01-07 14:44:02 +0100
committerSebastian Thiel <byronimo@gmail.com>2015-01-07 14:44:02 +0100
commit73790919dbe038285a3612a191c377bc27ae6170 (patch)
treeced3af491a2b4354c15fb161102e9704d180d8d4 /doc/source/tutorial.rst
parent45eb728554953fafcee2aab0f76ca65e005326b0 (diff)
parentb6ed8d46c72366e111b9a97a7c238ef4af3bf4dc (diff)
downloadgitpython-73790919dbe038285a3612a191c377bc27ae6170.tar.gz
Merge branch 'commit_by_actor' of https://github.com/firm1/GitPython into firm1-commit_by_actor
Diffstat (limited to 'doc/source/tutorial.rst')
-rw-r--r--doc/source/tutorial.rst5
1 files changed, 4 insertions, 1 deletions
diff --git a/doc/source/tutorial.rst b/doc/source/tutorial.rst
index d9b35fda..3f45b70d 100644
--- a/doc/source/tutorial.rst
+++ b/doc/source/tutorial.rst
@@ -297,7 +297,10 @@ Access objects and add/remove entries. Commit the changes::
# Access the entries directly
index.add(['my_new_file']) # add a new file to the index
index.remove(['dir/existing_file'])
- new_commit = index.commit("my commit message")
+ new_commit = index.commit("my commit message") # commit by commit message first
+ my_author = Actor("An author", "author@example.com")
+ my_committer = Actor("A committer", "committer@example.com")
+ next_commit = index.commit("my commit message", author=my_author, commiter=my_committer) # commit by commit message and author and committer
Create new indices from other trees or as result of a merge. Write that result to a new index file::