branch = repo.heads[branchname]
else:
branch = repo.create_head(branchname, self.commit)
- if isBranch:
+ if isBranch: # track remote branch
branch.set_tracking_branch(origin.refs[branchname])
# update it to the latest remote commit
branch.checkout()
repo.git.rebase(self.commit)
print "...done",
- if repo.head.reference.commit != repo.refs[self.commit].commit:
+ if repo.head.reference.commit != repo.commit(self.commit):
print "(keeping local patches around)",
print