in merge_connect_go_pr.py [0:0]
def clean_up():
if "original_head" in globals():
print("Restoring head pointer to %s" % original_head)
run_cmd("git checkout %s" % original_head)
branches = run_cmd("git branch").replace(" ", "").split("\n")
for branch in list(filter(lambda x: x.startswith(BRANCH_PREFIX), branches)):
print("Deleting local branch %s" % branch)
run_cmd("git branch -D %s" % branch)