stillwwater / command_terminal

Unity Command Terminal: In-Game Console
MIT License
445 stars 60 forks source link

Keep .meta files in version control, ignore in root dir only #9

Open bgr opened 6 years ago

bgr commented 6 years ago

Not having meta files causes them to be regenerated on every user's computer, each with a different GUID. This makes it impossible to open the scene/prefab files on different computers - Terminal will instead be represented as "missing script".

This change fixes this problem by only ignoring meta files in root dir - meta files in CommandTerminal and all other subdirectories will not be ignored by git.

bgr commented 6 years ago

Note that this will break the references to console (Terminal script) in scenes/prefabs on every user's machine after they update (because GUIDs in their own meta files will change), but that'll be the last time they'll have this problem.

stillwwater commented 5 years ago

I don't see how this is a problem, when users import the scripts for the first time, new meta files are created. Those meta files can be committed to your project's repository, meaning they would be consistent across machines.

bgr commented 5 years ago

That can be problematic for users that'd like to import it as a git submodule/subtree.

JimmyCushnie commented 5 years ago

You don't need to keep every single .meta file in /CommandTerminal. All you need is Terminal.cs.meta. You can ignore all .meta files except for that one with a gitignore that looks like this:

*.meta
!Terminal.cs.meta

I added this to my fork, if you're interested.