raise error if commit is not found