summaryrefslogtreecommitdiff
path: root/doc/tutorial.rst
diff options
context:
space:
mode:
authorSebastian Thiel <byronimo@gmail.com>2009-11-04 19:36:29 +0100
committerSebastian Thiel <byronimo@gmail.com>2009-11-04 19:41:01 +0100
commitace1fed6321bb8dd6d38b2f58d7cf815fa16db7a (patch)
tree3878d5e0282531596d42505d8725482dde002c20 /doc/tutorial.rst
parentf1e9df152219e85798d78284beeda88f6baa9ec7 (diff)
downloadgitpython-ace1fed6321bb8dd6d38b2f58d7cf815fa16db7a.tar.gz
head.checkout method added including test
Diffstat (limited to 'doc/tutorial.rst')
-rw-r--r--doc/tutorial.rst5
1 files changed, 4 insertions, 1 deletions
diff --git a/doc/tutorial.rst b/doc/tutorial.rst
index f48aceb0..695e9812 100644
--- a/doc/tutorial.rst
+++ b/doc/tutorial.rst
@@ -351,7 +351,10 @@ is the following one.
The previous approach would brutally overwrite the user's changes in the working copy
and index though and is less sophisticated than a git-checkout for instance which
-generally prevents you from destroying your work.
+generally prevents you from destroying your work. Use the safer approach as follows:
+
+ >>> repo.heads.master.checkout() # checkout the branch using git-checkout
+ >>> repo.heads.other_branch.checkout()
Using git directly
******************