File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -373,8 +373,13 @@ def test_references_and_objects(self, rw_dir):
373373 assert origin == empty_repo .remotes .origin == empty_repo .remotes ['origin' ]
374374 origin .fetch () # assure we actually have data. fetch() returns useful information
375375 # Setup a local tracking branch of a remote branch
376- empty_repo .create_head ('master' , origin .refs .master ).set_tracking_branch (origin .refs .master )
377- origin .rename ('new_origin' ) # rename remotes
376+ empty_repo .create_head ('master' , origin .refs .master ) # create local branch "master" from remote branch "master"
377+ empty_repo .heads .master .set_tracking_branch (origin .refs .master ) # set local "master" to track remote "master
378+ empty_repo .heads .master .checkout () # checkout local "master" to working tree
379+ # Three above commands in one:
380+ empty_repo .create_head ('master' , origin .refs .master ).set_tracking_branch (origin .refs .master ).checkout ()
381+ # rename remotes
382+ origin .rename ('new_origin' )
378383 # push and pull behaves similarly to `git push|pull`
379384 origin .pull ()
380385 origin .push ()
You can’t perform that action at this time.
0 commit comments