def can_merge(git, into):
    """we check if the branch we want to send commits to is up to date or not. if current branch is equal to into branch we check if we want to commit"""
    current_branch = git.get_current_branch()
    if current_branch == into:
        return git.has_commitable_changes()
    for line in git(f'branch --contains {current_branch}').splitlines():
        if line.strip().decode('utf-8') == into:
            return True
