In shopify theme dev and shopify theme metafields pull, the metafields.json file is automatically created.
While versioning should remain a developer's choice, it seems beneficial to add .shopify/metafields.json to .gitignore by default when the file exists. This aligns with existing Shopify app dev workflows and offers the convenience by minimizing the need for manual configuration.