Hello everyone. I’m working with a git repository connected to Azure DevOps. Some time ago I was working with storing parameters inside .gitattributes file and process of parsing that file and writing it content into .csv file as a report. I prepared this file in format that looks like:
param_name_1=xxx 1;param_name_2=zzz 1;param_name_3=yyy 1
param_name_1=xxx 2;param_name_2=zzz 2;param_name_3=yyy 2
param_name_1=xxx 3;param_name_2=zzz 3;param_name_3=yyy 3
param_name_1=xxx 4;param_name_2=zzz 4;param_name_3=yyy 4
param_name_1=xxx 5;param_name_2=zzz 5;param_name_3=yyy 5
It was all was nice and smooth, until I noticed while creating different branch and checkingout my main one or cloning main branch that there is some warning inside git bash regarding .gitattributes file:
$ git clone https://....
Cloning into 'test-repo'...
remote: Azure Repos
remote: Found 15926 objects to send. (214 ms)
Receiving objects: 100% (15926/15926), 26.50 MiB | 30.25 MiB/s, done.
Resolving deltas: 100% (6177/6177), done.
xxx 1;param_name_2 is not a valid attribute name: tests/utils/gitattributes_sample/.gitattributes:1
xxx 2;param_name_2 is not a valid attribute name: tests/utils/gitattributes_sample/.gitattributes:2
xxx 3;param_name_2 is not a valid attribute name: tests/utils/gitattributes_sample/.gitattributes:3
xxx 4;param_name_2 is not a valid attribute name: tests/utils/gitattributes_sample/.gitattributes:4
xxx 5;param_name_2 is not a valid attribute name: tests/utils/gitattributes_sample/.gitattributes:5
I looked into git documentation, hoping to fix my problem and noticed that parameters should be separated by white space. So then I modified my .gitattributes file to follow a git documentation and now it looks like this:
param_name_1=xxx_1 param_name_2=zzz_1 param_name_3=yyy_1
param_name_1=xxx_2 param_name_2=zzz_2 param_name_3=yyy_2
param_name_1=xxx_3 param_name_2=zzz_3 param_name_3=yyy_3
param_name_1=xxx_4 param_name_2=zzz_4 param_name_3=yyy_4
param_name_1=xxx_5 param_name_2=zzz_5 param_name_3=yyy_5
But I can’t find anything about this warning on internet or documentation and don’t know how to deal with it. The warning still pops up when I switch branches or clone repository, even tho my .gitattributes file is fixed now and doesn’t contain any ;. Is there a quick way to get rid off this warning without making a mess in a repo? I’m not the only one working on it and it would be troublesome to i.e. remove commit from history or hard reset it to state before my initial changes in .gitattributes.