'Why does git merge and accept both changes in VS Code leave unmatched bracket pairs?

Fairly straightforward question - When I have a merge conflict in a CSS file and use VSCode's 'accept both' option for the conflicting block, I'm often left with a CSS file that has an error right at the end because somewhere in the 10,000 lines, there is a bracket that hasn't been correctly merged.

If I'm accepting both changes (and both files are correct individually) why is one bracket left out of the newly created merge file?

How can I avoid that?

Is there a good tool to find non-paired brackets?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source