Sometimes in Drupal you need to remove the UUID from your exported .yml files. This is for example the case if you'd like to transfer configuration to a different site or for migrations.
I found a wonderful command written in this Gist by @DavMorr:
https://gist.github.com/DavMorr/c3a5b73820778e2fb213cdd9d614f27a
These are the simple steps to remove the UUID:
drupal config:export --directory=”[full-path-to-location]” --tar --remove-uuid --remove-config-hash
sed -i.bak '/^uuid: /d' ./*
The
i.bak
arg will create a backup of the affected file. When satistifed with the results, you can safely get rid of the .bak files:
rm *.bak