better exception if requested branch does not exist