Checks out given branch.

def checkout_branch(self, branch):
        """Checks out given branch."""

        _, stdout, stderr = self.git_exec(
            ['checkout', branch],
            with_extended_output=True)
        return '\n'.join([stderr, stdout])