Skip to content

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

Open
bgr wants to merge 1 commit intostillwwater:masterfrom
bgr:keep_meta_files
Open

Keep .meta files in version control, ignore in root dir only#9
bgr wants to merge 1 commit intostillwwater:masterfrom
bgr:keep_meta_files

Conversation

@bgr
Copy link
Contributor

@bgr bgr commented Sep 24, 2018

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.

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
Copy link
Contributor Author

bgr commented Sep 24, 2018

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
Copy link
Owner

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
Copy link
Contributor Author

bgr commented Oct 11, 2018

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

@JimmyCushnie
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants