Don't change the first 2 rows of a metadata file in version control
Usually a Metadata file retrieved from Salesforce starts like this:
<?xml version="1.0" encoding="UTF-8"?>
<PermissionSet xmlns="http://soap.sforce.com/2006/04/metadata">
So two lines, first with the version and encoding UTF-8 and second with the type of metadata.
Now when GearSet does the deployment to version control, either from an Org or a Branch it uses this styling of the first row:
<?xml version="1.0" encoding="utf-8"?><PermissionSet xmlns="http://soap.sforce.com/2006/04/metadata">
So everything on one line, with the encoding in lower case.
I don't see a logical reason this should be different in the files and is then causing differences in the version control system.
Thanks for looking into this.
![](https://secure.gravatar.com/avatar/ccce85e2145a4a8796bb04927f7e3936?size=40&default=https%3A%2F%2Fassets.uvcdn.com%2Fpkg%2Fadmin%2Ficons%2Fuser_70-6bcf9e08938533adb9bac95c3e487cb2a6d4a32f890ca6fdc82e3072e0ea0368.png)
-
Additional background for consideration: note this is the case only when the "source control setting" [https://app.gearset.com/account/source-control-settings] > "XML quote escaping style" is set to
" for double quotes and ' for single quotes (Gearset default)
If the setting is set to
" for double quotes and ' for single quotes (Metadata API style)
The result is two lines as desired, first with the version and encoding UTF-8; however this is adding other changes to the way characters are escaped that causes the OP more problems.