2

There has been other questions in SO that explain how to use Git with Unity. I have also found this resource dealing with the same problem.

On the other hand there is this page dealing with git for Hololens development (using unity).

My question is more specific. You see in the .gitignore files in the first and second link, they include

# Autogenerated VS/MD/Consulo solution and project files
ExportedObj/
.consulo/
*.csproj
*.unityproj
*.sln
*.suo
*.tmp
*.user
*.userprefs
*.pidb
*.booproj
*.svd
*.pdb

in the ignore file. Now, in every unity project there is a C# solution file in the root directory (as well as a userprefs file and csproj file).

Why are these files not included for version control??

Ok, you can say "they are not included because when opening a project with unity, they are autogenerated" (really? is this true?)

But then why in the ignore file of the third resource (the one dealing with hololens development) there is no .sln or .userprefs or .csproj included in the ignore file?? (The C# files that are generated by unity are in the App directory which is included so those are not the subject of this question)

KansaiRobot
  • 7,564
  • 11
  • 71
  • 150
  • I don't know why its included, but I have a reasonable level of confidence that Unity can regenerate its own solution file if its missing. – Draco18s no longer trusts SE Nov 29 '17 at 01:26
  • 1
    A collection of .gitignore from GitHub : https://github.com/github/gitignore. There is one for Unity. I use it flawlessly for my Hololens projects. – RCYR Nov 29 '17 at 19:24
  • @RCYR Thanks! Actually that is almost identical at the unity one I am using, but it does not account(ignore) for the App and the UWP folders used for hololens. – KansaiRobot Nov 30 '17 at 05:22

1 Answers1

1

Simple answer to your question maybe this user is not interested to add or he has forget to add those files, as I saw another gitignore on Github, it has included .csProject, .userPrefs and .sln and it worked flawlessly accoridng to a user.

Muhammad Faizan Khan
  • 10,013
  • 18
  • 97
  • 186