Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
1
Question by lcbrett · Sep 15, 2011 at 06:33 AM · gitsvnexternal-vcs

Unity with git for external version control

Hello! I'm trying to use git for external version control with Unity Pro. I found this page in the manual, which gives a list of Library files that should be tracked. But I notice that the manual page was last modified about a year ago (2010-08-10), and I'm running Unity 3.4 (which was released later). Does anybody know if the manual's list of files-to-track is up to date? I'm wondering about files like BuildPlayer.prefs, EditorSettings.asset, EditorUserBuildSettings.asset, and others.

Also, does anyone know if *.unityproj files should be version tracked?

(Although I'm using git, I expect the same question would be applicable to users of svn, Hg, or other version control systems.)

Thanks in advance!

Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

5 Replies

· Add your reply
  • Sort: 
avatar image
0

Answer by PaxNemesis · Sep 15, 2011 at 11:16 AM

The information on that site should still be accurate. You should probably add the *.unityproj files and everything else in the directory you want to version control(except the obj and Temp directories). Though neither GIT nor any other version control system can do any accurate checks on files that aren't plain text.

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image
0

Answer by lcbrett · Sep 15, 2011 at 03:47 PM

Thanks, PaxNemesis! I also have some *.sln files in that directory, which I assume are MonoDevelop solution files. I've read that those should also be ignored by version tracking. Have you heard differently?

In case you're interested, git is reasonably smart about binary files. It can be configured (1) not to diff them, (2) to use an external diff tool, (3) to convert them into text files before diffing them (depending on the file type, of course), etc. It's pretty handy. See here for details. There's even an extension called git-media that lets you use git to version track your big binaries while storing the binaries themselves outside of git, which keeps your repos lean and fast.

Comment
Add comment · Show 1 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image PaxNemesis · Sep 15, 2011 at 08:40 PM 0
Share

Glad to be of help. There should be no need of adding the *.sln files as they will be recreated when you open the project through Unity.

Ah, haven't used GIT on anything other then code yet myself. But handy to know, I will check it out. Thanks for the info :)

avatar image
0

Answer by XaeroDegreaz · Feb 25, 2013 at 08:40 PM

I know this is a bit late, but have you tried using Git UniTEAM from the Asset Store? It's an editor extension that lets you manage your Git versioned project.

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image
0

Answer by AnomalusUndrdog · Apr 08, 2013 at 12:53 AM

I don't version control *.unityproj (or .csproj) because I know MonoDevelop can recreate those when not found. Those files are only used by MonoDevelop, and it's entirely optional to use MonoDevelop when coding for Unity anyway (I just use other text editors). So I don't like putting that in.

They're not really critical, and you won't lose anything if you don't include it in version control. AFAIK .unityproj is simply a list of .js files in your project, so MonoDevelop can show a listing of them in its IDE. You can recreate/refresh that file by going to the Unity Editor then click Assets > Sync MonoDevelop Project.

There are other files that MonoDevelop creates, like session files that say what files were last opened, so MonoDevelop can open them when you run it again. You surely won't want to version control those.

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image
0

Answer by HamsterCrack · May 16, 2014 at 12:08 AM

I use the following .gitignore and it works pretty well. You'll have to make your own decision about .sln and .csproj. I like including them, but they are not necessary since they are auto-generated. However, with the .sln since I use UnityVS it's best to commit to save some of the settings.

 # Unity Builds (save on storage space)
 Unity/Dist/
 
 # ---------------[ Unity generated ]------------------ #
 Unity/Temp/
 Unity/Obj/
 Unity/UnityGenerated/
 Unity/Library/
 *.unityproj
 *.booproj
 
 # Unity/*.sln
 # Unity/*.csproj
 
 # Unity crash handler generates
 Unity/sysinfo.txt
 
 # ----[ Visual Studio / MonoDevelop generated ]------- #
  
 Unity/ExportedObj/
 *.svd
 *.userprefs
 *.pidb
 *.user
 *.suo
 *.opensdf
 *.sdf
 
 # UnityVS generated from .pdb files
 Unity/Assets/Plugins/*.mdb
 Unity/Assets/Plugins/*.mdb.meta
 
 # -------------[ OS generated ]------------------------ #
 
 # Vim generated? Not sure
 *.swo
 
 .DS_Store
 .DS_Store?
 ._*
 .Spotlight-V100
 .Trashes
 ehthumbs.db
 Thumbs.db
 *~
 *.swp
Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

6 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Does Git or SVN work better with Unity? 6 Answers

.hg folder huge, causing issues with BitBucket 0 Answers

SVN Update problem 5 Answers

Unity & subversion (without Unity Pro) 4 Answers

Can a non-pro user serialize their assets to text instead of binary? 1 Answer


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges