split setup_branch into multiple commands