diff options
author | Sebastian Thiel <byronimo@gmail.com> | 2010-11-24 19:48:59 +0100 |
---|---|---|
committer | Sebastian Thiel <byronimo@gmail.com> | 2010-11-24 19:48:59 +0100 |
commit | 3175b5b21194bcc8f4448abe0a03a98d3a4a1360 (patch) | |
tree | f1a098c4b38ae3b7cf52600e9fc9c357cdd7c353 /doc/source/tutorial.rst | |
parent | fca367548e365f93c58c47dea45507025269f59a (diff) | |
parent | 3203cd7629345d32806f470a308975076b2b4686 (diff) | |
download | gitpython-3175b5b21194bcc8f4448abe0a03a98d3a4a1360.tar.gz |
Merge branch 'reflog'
Diffstat (limited to 'doc/source/tutorial.rst')
-rw-r--r-- | doc/source/tutorial.rst | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/doc/source/tutorial.rst b/doc/source/tutorial.rst index 9aadae47..642136ab 100644 --- a/doc/source/tutorial.rst +++ b/doc/source/tutorial.rst @@ -88,6 +88,14 @@ A symbolic reference is a special case of a reference as it points to another re head = repo.head # the head points to the active branch/ref master = head.reference # retrieve the reference the head points to master.commit # from here you use it as any other reference + +Access the reflog easily:: + + log = master.log() + log[0] # first (i.e. oldest) reflog entry + log[-1] # last (i.e. most recent) reflog entry + +For more information on the reflog, see the ``RefLog`` type's documentation. Modifying References ******************** |