@cli.command()<EOL>@click.option("<STR_LIT>", "<STR_LIT>", is_flag=True, default=False)<EOL>@pass_config<EOL>def getback(config, force=False):
repo = config.repo<EOL>active_branch = repo.active_branch<EOL>if active_branch.name == "<STR_LIT>":<EOL><INDENT>error_out("<STR_LIT>")<EOL><DEDENT>if repo.is_dirty():<EOL><INDENT>error_out(<EOL>'<STR_LIT>'.format(<EOL>"<STR_LIT:U+002CU+0020>".join([repr(x.b_path) for x in repo.index.diff(None)])<EOL>)<EOL>)<EOL><DEDENT>branch_name = active_branch.name<EOL>state = read(config.configfile)<EOL>origin_name = state.get("<STR_LIT>", "<STR_LIT>")<EOL>upstream_remote = None<EOL>fork_remote = None<EOL>for remote in repo.remotes:<EOL><INDENT>if remote.name == origin_name:<EOL><INDENT>upstream_remote = remote<EOL>break<EOL><DEDENT><DEDENT>if not upstream_remote:<EOL><INDENT>error_out("<STR_LIT>".format(origin_name))<EOL><DEDENT>repo.heads.master.checkout()<EOL>upstream_remote.pull(repo.heads.master)<EOL>merged_branches = [<EOL>x.strip()<EOL>for x in repo.git.branch("<STR_LIT>").splitlines()<EOL>if x.strip() and not x.strip().startswith("<STR_LIT:*>")<EOL>]<EOL>was_merged = branch_name in merged_branches<EOL>certain = was_merged or force<EOL>if not certain:<EOL><INDENT>certain = (<EOL>input("<STR_LIT>".format(branch_name))<EOL>.lower()<EOL>.strip()<EOL>!= "<STR_LIT:n>"<EOL>)<EOL><DEDENT>if not certain:<EOL><INDENT>return <NUM_LIT:1><EOL><DEDENT>if was_merged:<EOL><INDENT>repo.git.branch("<STR_LIT>", branch_name)<EOL><DEDENT>else:<EOL><INDENT>repo.git.branch("<STR_LIT>", branch_name)<EOL><DEDENT>fork_remote = None<EOL>for remote in repo.remotes:<EOL><INDENT>if remote.name == state.get("<STR_LIT>"):<EOL><INDENT>fork_remote = remote<EOL>break<EOL><DEDENT><DEDENT>if fork_remote:<EOL><INDENT>fork_remote.push("<STR_LIT::>" + branch_name)<EOL>info_out("<STR_LIT>")<EOL><DEDENT>
Goes back to the master branch, deletes the current branch locally
    and remotely.