One way to avoid this problem is procedural: (works for any project other than the Web site project, which does not have a project file):
Instead of doing the “get the latest” from your source control tool, always do the “open source control” inside Visual Studio and do the latest updates from Solution Explorer. VS will pull only files belonging to the project.
This is not an ideal answer - when you merge, you will probably end up pulling every file down in your branch, but it worked very well for us.
(of course, this requires that you use a version control tool that offers VS integration, it also requires that you add some non-compiled but necessary files (icons, etc.) to the project, or they will not to be carried down VS).
source share