summaryrefslogtreecommitdiff
path: root/git/test/test_docs.py
diff options
context:
space:
mode:
authorForrest Hopkins <fingerheroes@gmail.com>2016-08-23 22:45:52 -0700
committerSebastian Thiel <byronimo@gmail.com>2016-08-24 07:45:52 +0200
commitdf65f51de6ba67138a48185ff2e63077f7fe7ce6 (patch)
tree90d4368e9c2e6c94ffb6749608e9afcff7eb61f0 /git/test/test_docs.py
parent31ad0a0e2588819e791f4269a5d7d7e81a67f8cc (diff)
downloadgitpython-df65f51de6ba67138a48185ff2e63077f7fe7ce6.tar.gz
Update Remotes section (#502)
Update Remotes section The Remotes section was missing some pretty important info.
Diffstat (limited to 'git/test/test_docs.py')
-rw-r--r--git/test/test_docs.py9
1 files changed, 7 insertions, 2 deletions
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()