#!/usr/bin/env python3 from utils import handle_error, run_cmd def checkout_branch(branch: str) -> None: if run_cmd("git", "checkout", branch)[0] != 0: if run_cmd("git", "checkout", "-b", branch)[0] != 0: exit(1) def add_files(*files: str) -> None: for f in files: run_cmd("git", "add", f) def commit(msg: str) -> None: run_cmd("git", "commit", "-m", msg) def push(remote: str, branch: str): run_cmd("git", "push", "-u", remote, branch)