Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 14 Next capture
2021 2022 2023
2 captures
13 Jun 22 - 14 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
9
Question by roberto_sc · Oct 03, 2013 at 10:10 AM · versiongit

Ignoring folder meta files on version control

Unity creates and deletes meta files for folders inside the Asset folder.

That can create an annoying situation when using version control (that you can skip and go to the questions): someone creates a folder of files that will be ignored but forget to ignore the folder's meta file. Unity creates the meta file and the person adds the meta to version control. Another person gets the changesets and, since he doesn't have the folder, his Unity delete the meta file and he removes the meta file from version control. Not everyone in the team understand this, so the process is perpetuated in a loop from hell.

Surprisingly this happens all the time. So, two questions:

  1. Is it important to version folder meta files?

  2. Is there a way to automatically ignore folder meta files - particularly on git or mercurial?

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 DannyB · Oct 04, 2013 at 11:03 AM 0
Share

Good question. I had a similar situation for different reasons. I sometimes end up with empty folders, and since git does not take them in, I end up with meta files but no folders in the repo, so Unity complains and deletes them, and then I am in the loop from hell.

  1. As far as I can tell, folder meta files have little use

  2. I do not think there is a straight forward way to gitignore folder meta files, as they are just *.meta files like any other. So the only way would probably be to run an external script before committing.

  3. I would recommend NOT ignoring them, and ins$$anonymous$$d, apply a policy in your $$anonymous$$m's workflow that states they should put content to be ignored inside folders that start with _ (or some other symbol) and then you have a global gitignore for that (which will ignore the folder and its meta).

2 Replies

· Add your reply
  • Sort: 
avatar image
6
Best Answer

Answer by roberto_sc · Oct 29, 2013 at 07:19 AM

I made the same question on StackOverflow and got a very good answer that you can check here.

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 Lieene-Guo · Aug 30, 2019 at 02:38 PM

Add this to .getignore

 #Ignore all .meta file
 *.meta
 #But not source file with postfix. which is everything but a folder
 !*.*.meta

This will ignore file without postfix. But that shouldn't hurt.

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 Havie · Apr 05, 2021 at 02:38 PM 0
Share

Hey, do you know how that work in conjunction with the default lines in the gitignore: # Never ignore Asset meta data (What is this? came with the default) !/[Aa]ssets/**/*.meta

should the above lines be removed then since it seems contradictory?

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

17 People are following this question.

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

Related Questions

How to increment a Version string everytime Unity is built? 3 Answers

Unity hub won't add new version 0 Answers

Behaviour is missing when using project on different computer. 1 Answer

Missing new UI components in components menu 3 Answers

Downloading files with Git 0 Answers


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