checkoutBranch() can now create a new branch via newBranch argument (str)