I usually work with .NET using Git for versioning. In my team, we work in parallel and we often commit our code to integrate in the application. Everything is fine BUT the Visua
In our project we check these into version control. We started with the .gitignore
from github and a simple .gitattributes
file:
# Auto detect text files and perform LF normalization
* text=auto
# Custom for Visual Studio
*.cs diff=csharp
This is because the union
merge strategy can actually be dangerous for these files, see Merge conflicts in csproj files for details why this is not always safe and is probably not what you want.
You'll generally get merge conflicts every time but they're really easy to handle quickly in Visual Studio. An example case is adding a new empty project to a solution and committing it, then having multiple team members add different files to the project.
In theory you could have a custom merge driver defined that handles xml merges better, but I haven't seen that done by anyone else yet.