def ensure_clean_git(operation='operation'):
    """ Verify that git has no uncommitted changes """
    if os.system('git diff-index --quiet HEAD --'):
        print("Unstaged or uncommitted changes detected. {} aborted.".format(
            operation.capitalize()))
        sys.exit()