Search Unity

Source Control w/ Free Unity ignore files (Git, SVN, CVS)

Discussion in 'Formats & External Tools' started by chbfiv, Dec 5, 2010.

  1. chbfiv

    chbfiv

    Joined:
    Dec 2, 2010
    Posts:
    22
    #UPDATE: I assumed it would work for SVN and CVS
    #but dreamora pointed out that they would have issues
    #We use Git and currently have had no issues
    #Git is also Rad, I dont use SVN or CVS anymore unless I'm forced.

    #this is the git ignore file if you want to use the free Unity
    # the ! negates an ignore, so you ignore everything in Library then
    #un-ignore the metadata folder and those specific files
    #use at your own risk.

    #NOTE: this will cause your collaborators to re-import assets
    # (previews and cache), but it seems to have no value to keep in source control

    #I also wanted to note that Unity selling an asset server is retarded.
    #We already have awesome source control systems that we know are safe and
    #reliable. Why anyone would use the asset server is beyond me; why Unity felt the need to
    #recreate a well developed tool seems greedy. Focus on your product not on making things
    #more difficult for your users.

    Temp/*
    Library/*


    !Library/*.asset
    !Library/AssetImportState
    !Library/AssetVersioning.db
    !Library/BuildPlayer.prefs
    !Library/ScriptMapper
    !Library/assetservercachev3
    !Library/expandedItems
    !Library/guidmapper
    !Library/unity default resources
    !Library/unity editor resources
    !Library/metadata/
     
    Last edited: Dec 5, 2010
  2. Dreamora

    Dreamora

    Joined:
    Apr 5, 2008
    Posts:
    26,601
    And this works?
    Cause ignoring the library without the Unity Pro meta means that not a single dependency and as such neither scenes nor prefabs will transfer (naturally also no assignements on objects in scenes to other scripts or objects or assets)
     
  3. chbfiv

    chbfiv

    Joined:
    Dec 2, 2010
    Posts:
    22
    You can see that I'm including almost everything in Library except the preview and cache folder (So I'm not ignoring the metadata). Our game is rather simple ATM however, so I would create a backup before you test it. I can't imagine it's perfect, but of course feedback is always welcome and it works great for me a few friends using Git.
     
  4. Dreamora

    Dreamora

    Joined:
    Apr 5, 2008
    Posts:
    26,601
    Ah sorry, missed that you reimported the meta behind there again, it somehow blended down to just files there for my brain (too many / with too much !Library I guess)

    As for your assumption: Due to how SVN and CVS work, this approach won't work with them actually, at least not usable. They both store delta sets, not distinct changes, so they can only update full files which with binary won't work well if at all. Due to this, the inclusion of meta there does not help much as you aren't allowed to touch anything basically to transport the change (thats the thing that the Unity Pro VCS meta files solve for you as they transfer per file relationships. They still don't merge well but unlike the meta in the library, they are not cryptical which prevents you from bringing the meta in relation to its file)
    GIT and Mercurial work better in this scenario though I would expect that even they get into situations where a change "F***s it up all" especially if you don't do small local commits on a very regular base (after each successful change or nearly like that)
     
  5. chbfiv

    chbfiv

    Joined:
    Dec 2, 2010
    Posts:
    22
    I updated my post to reflect your comments. Thanks=) *sadly couldn't change the title.
     
  6. seon

    seon

    Joined:
    Jan 10, 2007
    Posts:
    1,441
    We use Unity Asset Server for all of our projects across all of our teams that use Unity, and we use Perforce for our non Unity projects. Asset Server, though young and missing some elements like branching, really rocks.

    Having a solution that runs inside Unity is 1000000% better than any external solution. Its fast, its easy to use and understand, and doesn't require checking in our out. It works beautifully with the intended Unity workflow.

    I hope Unity invest even more resources and $$$ into making Asset Server an even better solution for us.
     
  7. chbfiv

    chbfiv

    Joined:
    Dec 2, 2010
    Posts:
    22
    I don't think exaggeration helps your point, just proves your bias. It looks like they took git, hid the internals, created a GUI, charged you $500 (per person? who knows), and laughed all the way to the bank. All that time they could have been working on features that improved their product instead of creating things that already exist (lots of solid options) and charging their users for it. No offense. Greedy.
     
  8. Dreamora

    Dreamora

    Joined:
    Apr 5, 2008
    Posts:
    26,601
    Right, the $500 are per seat on top of Unity Pro

    Also one of the major drawbacks was ignored: You must host the box yourself on a vdedicated / dedicated machine.
    This means that you not only pay a premium fee for the technology, you will also pay an order of a magnitude more per year on the server to host it with a reasonably bandwidth, to maintain the box and at worst to pay the traffic.

    And all that for something thats unhappily barely supported, the AS got a single update the past 2.x years, from AS 1.x to 2.0. This did not add any new feature and although reported several dozen times and although the release happened many months ago, UT has still not fixed the Windows installer of the AS for example which is hilarious. (you can work around the installer prob though, as I posted the instructions on how to do it)


    The AS licenses, at the current feature and support level, would make sense if they were in the $100 - $200 range and available to all licenses, so they can become an option to non-pro users and mixed remote teams. There I would see them fit in.
    That way it would pretty surely also generate more money and hopefully justify some more dedicated support in this field.
     
    Last edited: Dec 5, 2010
  9. seon

    seon

    Joined:
    Jan 10, 2007
    Posts:
    1,441
    Bias? No, as I said, we use Perforce as well. And I stated that AS is young and still missing important things. It's still an awesome bit of technology that integrates beautifully inside Unity. Exaggeration? Maybe.. but have you used Asset Server? Your not even commenting on its features... just its cost... and UT's subsequent greed.... which is very surprising considering considering you use Unity Free.

    Anyway, each to their own. You seem way more bitter than you should be considering you seem to have found a free solution. And considering it's for Unity Free, which means you have spent $0 on this tech, I am not sure why feel the need to call Unity greedy at all.

    And calling someone or greedy and prefacing it with No Offence... that's just even more offensive (not for me though.. it's my birthday today, so nothing you can call me is going to upset me).

    Your turn... :)
     
  10. chbfiv

    chbfiv

    Joined:
    Dec 2, 2010
    Posts:
    22
    Not trying to upset you. Happy Birthday=)

    We also plan on purchasing the full Android version after we finish testing out Unity. Which is why it is good that they have a free version; otherwise we might not have purchased anything. I was only pointing out your "1000000% better" exaggeration because it is a fallacy that is used to gain weight in a conversation (for example, I've seen a million movies so I know more about movies than you.) I personally argue that its not better and if you want to know why you can learn more about Git; http://git-scm.com/ or a hand full of other SCM's out there that have been around the block and back.

    I'm happy for your source control integration, but don't blame Unity when your data is corrupted and you spend more time working on the SCM than the product. =)
     
  11. seon

    seon

    Joined:
    Jan 10, 2007
    Posts:
    1,441
    I know, its all cool :)
     
  12. Macguffin

    Macguffin

    Joined:
    Jan 12, 2011
    Posts:
    6
    This is excellent stuff, thanks. It's finally forcing me to try GIT, which isn't a bad thing either.
     
  13. pakfront

    pakfront

    Joined:
    Oct 6, 2010
    Posts:
    551
    Sounds like it would work well with git on Dropbox too. Thanks!
     
  14. Dreamora

    Dreamora

    Joined:
    Apr 5, 2008
    Posts:
    26,601
    sounds like overkill.
    either use git or use dropbox but pushing git through dropbox means a massive amount of datasync (don't even try it for unity projects unless you have DP Pro 50 at least)
     
  15. pakfront

    pakfront

    Joined:
    Oct 6, 2010
    Posts:
    551
    Oh. Is git more heavy on datasync than CVS or SVN? Or is it a Unity specific issue (working with binary assets rather than just text files) that makes it so heavy?
     
  16. pakfront

    pakfront

    Joined:
    Oct 6, 2010
    Posts:
    551
  17. ouchie

    ouchie

    Joined:
    Feb 24, 2011
    Posts:
    1
    I've been using git for non unity projects for a while and haven't looked back (at cvs, svn). I hear a bit of talk about Asset Server and paying for a dedicated machine and such. If you guys just want to use git as a free option I highly recommend you check out www.assembla.com for hosting your git repo. About a year ago I looked at different git hosting sites and Assembla was the only site that allowed free, private git hosting with unlimited repos for unlimited users. They also have commercial options extras for bigger projects but I've found their free options perfect for me. Highly recommend. :)
     
  18. meroon

    meroon

    Joined:
    Jan 9, 2008
    Posts:
    23
    I used the .gitignore exactly and when I cloned my project to another machine all of the asset links were broken. Any idea why this would be happening?
     
  19. Dreamora

    Dreamora

    Joined:
    Apr 5, 2008
    Posts:
    26,601
    you did not include all that was needed.
    without pro and vcs enabled the library folder is crucial for asset relationships
     
  20. meroon

    meroon

    Joined:
    Jan 9, 2008
    Posts:
    23
    so do I need to include the entire Library folder then?
     
  21. Thomas-Lund

    Thomas-Lund

    Joined:
    Jan 18, 2008
    Posts:
    465
    We are ourselves in the Unity Asset Server boat - and while I was bitching about price/performance/lack of certain features a bit earlier, I now think its _the_ best solution for Unity in a team setting.

    Not tried git with Unity, but we've been on a contract the last 5-6 months where they are using SVN with Unity. And it is totally disrupting workflow wise. Cant do this, cant do that, need to do things in a certain way, sometimes need to shut down Unity for a safe commit etc.

    We have certainly already spend more time on SVN issues than the $500/developer for the asset server license. Thats for certain.

    So before anyone bitches too much about it - try it first and see if it isnt worth it for you too.
     
  22. Dreamora

    Dreamora

    Joined:
    Apr 5, 2008
    Posts:
    26,601
    Hehe I used it and I agree it has benefits.
    But as long as you do what you commonly always do, disallow artists from touching the versioning system in an unmanaged way, SVN works pretty well too with enabled VCS support
    It turns out that it is more a matter of using the right tool to use SVN, which out of my view is not Tortoise as tortoise supports half arsed commits and other breaking operations, which I didn't realize as long as I myself only used it. We had much more success and hardly never any problem since we use SmartSVN though, which shows on a near daily base how lacking Tortoise in reality is for using SVN.


    Another benefit of SVN over Unity Asset Server is that there are hosters that offer performant, payable solutions, while an Asset Server requires you to have a vdedicated or dedicated machine if you want to work in a remote team, so its not only the $500 on top of Pro per seat it costs, its ongoing costs can easily be 10+ times higher as well.

    For an inhouse team I agree, nothing is going to beat the Unity Asset Server (I've my own personal things on my own server machine here in the LAN too)
     
  23. Meltdown

    Meltdown

    Joined:
    Oct 13, 2010
    Posts:
    5,822
    I'm using Mercurial and this setup works as I've used in the past.
    Although I question your use of the expandeditems object.

    If I'm correct it simply remembers which items in the asset tree in the editor the user has expanded or not.
    So not really something that should be in source control.
     
  24. goat

    goat

    Joined:
    Aug 24, 2009
    Posts:
    5,182
    I've read this thread and why is it only developers that ever complain about SVN, GIT, CVS, or none-such?

    Anyway, I'd like to see Unity offer or make available free their 'automated' regression testing solution for Unity, or at least a regression test for one reasonably complex Unity game.
     
  25. Fehr

    Fehr

    Joined:
    Mar 3, 2011
    Posts:
    23
    Here's the .gitignore I've been working with if anybody's interested.

    *.sln
    *.userprefs
    *.csproj
    *.pidb
    *.unityproj
    .DS_Store
    /Library/FailedAssetImports.txt
    /Library/cache/
    /Library/previews/
    /Library/ScriptAssemblies
    /obj
    /Temp
     
  26. Meltdown

    Meltdown

    Joined:
    Oct 13, 2010
    Posts:
    5,822
    I only check in my Assets folder now. Everything else is ignored.
     
  27. Dreamora

    Dreamora

    Joined:
    Apr 5, 2008
    Posts:
    26,601
    as per Unity 3.5, checkin assets and projectsettings
    the library folder and anything created on the fly is for ignore.
     
  28. Soviut

    Soviut

    Joined:
    Sep 17, 2012
    Posts:
    9
  29. goat

    goat

    Joined:
    Aug 24, 2009
    Posts:
    5,182