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
0
Question by twoshorts · Mar 21, 2016 at 09:59 AM · gitversion-controlsource-control

How to properly use git with a team?

I am working on a game with one of my friends, and every time we push / fetch there are multiple errors relating to binary files / metadata files because unity changes the files automatically on startup and while we are just generally using the app. Because the files are not matching, not everything is able to be added, and there are constant errors. What is the best way to deal with this?

Comment
Add comment · Show 1
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 Hellium · Mar 21, 2016 at 09:48 AM 1
Share

Have you read the manual first ?

http://docs.unity3d.com/$$anonymous$$anual/ExternalVersionControlSystemSupport.html

3 Replies

· Add your reply
  • Sort: 
avatar image
1

Answer by taxvi · Mar 21, 2016 at 12:33 PM

You need to tell the version control system to ignore those files. I use .git and I've recently found this amazing unity .gitignore file on github which basically syncs only Assets and ProjectSettings folders. ProjectSettings contain useful info like layers, and quality settings, etc...

Apart from this, github also has a very nice feature of providing up-to-date gitignore files by default when you are setting up a repo there:

alt text


screen-shot-2016-03-21-at-42747-pm.png (83.6 kB)
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
1

Answer by RChrispy · Mar 21, 2016 at 01:05 PM

I use a .gitignore and a .gitattributes file to manage the basics. Just add this into your git repository folder.

.gitignore:

 ##################
 # Unity ignores:
 ##################
 
 Temp/
 Library/
 obj/
 ExportedObj/
 
 *.csproj
 *.pidb
 *.unityproj
 *.suo
 *.sln
 *.svd
 *.userprefs
 *.user
 *.booproj
 
 ################
 #OS generated
 ################
 .DS_Store
 .DS_Store?
 ._*
 .Spotlight-V100
 .Trashes
 ehthumbs.db
 Thumbs.db

.gitattributes:

 *.prefab binary
 *.unity binary
 *.anim binary
 *.controller binary
 *.mat binary
 *.asset binary
 *.png binary
 *.jpeg binary
 *.jpg binary
 *.wav binary
 *.mp3 binary

Find information: here and here

Comment
Add comment · Show 2 · 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 elenzil · Mar 21, 2016 at 11:02 PM 1
Share

great answer.

one note: do not git-ignore .meta files ! the answer does not say you should, but it's worth saying because the OP asked about them. .meta files contain critical information about asset files, and they work fine w/ a multi-person $$anonymous$$m using git.

avatar image RChrispy · Mar 23, 2016 at 03:54 PM 0
Share

True .meta files are important! ;)

ps: If you like the answer please upvote so others see it faster. :)

avatar image
0

Answer by Link0n3 · Mar 24, 2016 at 01:26 PM

There are plenty of blogs/posts out there explaining how to do that. One very simple that cover all the passages is the following: Unity and Git

Remember that apart from the necessary gitignore you have to change also editor in project settings. Probably the error you get could do to the meta option that is there.

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

8 People are following this question.

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

Related Questions

How to fix /Library/ conflicts in GitHub repo for Unity project? 1 Answer

UnityYAMLMerge: File is not a valid text serialization YAML file 1 Answer

Materials and textures go missing after Git commit 2 Answers

How can I visually see changes made to a scene since the last git commit 0 Answers

version control - related to another question 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