Git is good at automatically merging the file changes, but it can sometimes throw merge conflicts. In such a case, you will have to manually resolve the conflicts before syncing your local and remote branch.
When there are merge conflicts, Visual Studio 2017 will list down the conflicts under the Merge In Progress panel of the Sync view. Click on the Conflicts link to start resolving the file conflicts:
This will bring up a list of files with conflicts. Selecting a file lets you accept the changes in the source branch where you are merging. You can also compare the files by using the Diff link and compare with Remote ...