Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Update Remotes section
The Remotes section was missing some pretty important info
  • Loading branch information
forresthopkinsa authored Aug 24, 2016
commit 768c1dfe8b5cb521c004518268acdad65a11272d
9 changes: 7 additions & 2 deletions git/test/test_docs.py
Original file line number Diff line number Diff line change
Expand Up @@ -373,8 +373,13 @@ def test_references_and_objects(self, rw_dir):
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()
Expand Down