Hi I've a problem commiting a file in VSCode (1.30.1) using git source control (2.19.1.windows.1). The commit changes a file, I did not change and want not to be changed. The setup is the following: I am on Windows 10, having git configured with "checkout windows style, commit unix style" git config --global core.autocrlf true
. But when I commit the following happens.
It is a .json file with the following key:
{
"description":
"xxxxxxx"
},
but my commit turns this line into
{
"description": "xxxxxxx"
},
Tested core.autocrlf input
and false
. But that does not fix that issue. Didn't face that behaviour before. Any other suggestions or ideas? Thanks and cheers.
Update: Another example
Creating a test.json file containing
{
"test1": {},
"test2": {}
}
works perfectly, but adding a new line like
{
"test1": {
},
"test2": {}
}
will look like the first one after commiting. It seems like a styling issue in some way, not depending on editor or system, because other repos are working as expected.