Skip to content

Instantly share code, notes, and snippets.

@pigreco
Created April 2, 2016 22:09
Show Gist options
  • Save pigreco/fd643455c93a4adf90fdbfddd1126edb to your computer and use it in GitHub Desktop.
Save pigreco/fd643455c93a4adf90fdbfddd1126edb to your computer and use it in GitHub Desktop.
# create a new branch
new_branch = repo.create_head('processing_test')
# create upstream remote urls
upstream = repo.create_remote('upstream', repo_qgis)
origin = repo.remotes.origin
upstream = repo.remotes.upstream
# get heads and checkout new branch
heads = repo.heads
heads.new_branch.checkout()
# pull to new branch from qgis
upstream.pull(refspec=heads.master)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment