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)

3
  • 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. Commented Nov 29, 2017 at 1:26
  • 1
    A collection of .gitignore from GitHub : github.com/github/gitignore. There is one for Unity. I use it flawlessly for my Hololens projects.
    – RCYR
    Commented Nov 29, 2017 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. Commented Nov 30, 2017 at 5:22

1 Answer 1

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.

Not the answer you're looking for? Browse other questions tagged or ask your own question.