Deployment error Must specify a non-empty label for the CustomObject

The error will occur when the Object's label tag is missing in the promotion branch.

A possible scenario for this to happen:

A custom object have been created in a lower environment. Instead of committing the whole object to the next environment, only a few fields are committed. This will create an incorrect file for the object in the target branch. The file won't contain the label tag. Next time you try to commit the whole object, the deployment is failing because the promotion doesn't contain the label.

Solution:

You need to fix the feature branch and promotion branch by copying the feature branch where the whole object was committed. After this, you can deploy again.

To prevent this issue, the whole object must be committed and deployed after being created.

How did we do?