diff options
author | Sebastian Thiel <byronimo@gmail.com> | 2011-06-07 22:26:19 +0200 |
---|---|---|
committer | Sebastian Thiel <byronimo@gmail.com> | 2011-06-07 22:26:19 +0200 |
commit | e0524096fa9f3add551abbf68ee22904b249d82f (patch) | |
tree | d238d4e8cf89ecd76ef79c31762f6dd1c8e2c07a /doc/source/tutorial.rst | |
parent | 36a984803df08b0f6eb5f8a73254dd64bc616b67 (diff) | |
download | gitpython-e0524096fa9f3add551abbf68ee22904b249d82f.tar.gz |
Fixed up docs in preparation for the new 0.3.1 release
Diffstat (limited to 'doc/source/tutorial.rst')
-rw-r--r-- | doc/source/tutorial.rst | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/doc/source/tutorial.rst b/doc/source/tutorial.rst index 5530cedd..a9a3f81d 100644 --- a/doc/source/tutorial.rst +++ b/doc/source/tutorial.rst @@ -385,6 +385,21 @@ The item returned is a DiffIndex which is essentially a list of Diff objects. It for diff_added in wdiff.iter_change_type('A'): do_something_with(diff_added) +Use the diff framework if you want to implement git-status like functionality. + +* A diff between the index and the commit's tree your HEAD points to + + * use repo.index.diff(repo.head) + +* A diff between the index and the working tree + + * use repo.index.diff(None) + +* A list of untracked files + + * use repo.untracked_files + + Switching Branches ****************** To switch between branches, you effectively need to point your HEAD to the new branch head and reset your index and working copy to match. A simple manual way to do it is the following one:: |