From df65f51de6ba67138a48185ff2e63077f7fe7ce6 Mon Sep 17 00:00:00 2001 From: Forrest Hopkins Date: Tue, 23 Aug 2016 22:45:52 -0700 Subject: Update Remotes section (#502) Update Remotes section The Remotes section was missing some pretty important info. --- git/test/test_docs.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'git') diff --git a/git/test/test_docs.py b/git/test/test_docs.py index a4604c58..b297363d 100644 --- a/git/test/test_docs.py +++ b/git/test/test_docs.py @@ -373,8 +373,13 @@ class Tutorials(TestBase): assert origin == empty_repo.remotes.origin == empty_repo.remotes['origin'] origin.fetch() # assure we actually have data. fetch() returns useful information # Setup a local tracking branch of a remote branch - empty_repo.create_head('master', origin.refs.master).set_tracking_branch(origin.refs.master) - origin.rename('new_origin') # rename remotes + empty_repo.create_head('master', origin.refs.master) # create local branch "master" from remote branch "master" + empty_repo.heads.master.set_tracking_branch(origin.refs.master) # set local "master" to track remote "master + empty_repo.heads.master.checkout() # checkout local "master" to working tree + # Three above commands in one: + empty_repo.create_head('master', origin.refs.master).set_tracking_branch(origin.refs.master).checkout() + # rename remotes + origin.rename('new_origin') # push and pull behaves similarly to `git push|pull` origin.pull() origin.push() -- cgit v1.2.1