command_terminal
command_terminal copied to clipboard
Keep .meta files in version control, ignore in root dir only
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.
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.
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.
That can be problematic for users that'd like to import it as a git submodule/subtree.
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.