The documentation says:
Sometimes, you make a change directly in a scratch org but you don’t want to pull that change into your local DX project. To exclude remote metadata changes, use the format
<api name>.<metadata type>in .forceignore.
Also I've seen people replace statement like this
**PasswordPolicy** with this
But when I add
.CustomMetadata it does not work and sfdx pull operations does pull new/changed metadata.
My company adds custom metadata to the package as preconfigured project settings. But when you develop at scratch org you add/change project settings and you don't want to pull them from scratch org.
Obvious solution is to exclude customMetadata directory, but you have to comment/uncomment it when developing and when creating a new package. Is there a better way of handling this?