From ace1fed6321bb8dd6d38b2f58d7cf815fa16db7a Mon Sep 17 00:00:00 2001 From: Sebastian Thiel Date: Wed, 4 Nov 2009 19:36:29 +0100 Subject: head.checkout method added including test --- doc/tutorial.rst | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'doc/tutorial.rst') 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 ****************** -- cgit v1.2.1