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"?>
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.
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.