0

This is a weird thing. I'm working with a team and we use Git to share the project. When I push my changes to the project, my Meta files never show as part of the submitted files. Sometimes, when I push my changes, the metafiles register on other users versions of the project.

But sometimes, especially when I create new scripts or prefabs, they get no metafiles.

I know that I have checked the "metafiles shown" option in the Editor menu. So, what am I missing? Why does this happen?

I'm using a MacBook with UnityPro. I manage my Git with SourceTree, but the files I'm looking for don't appear in regular Git through the terminal, either.

Whelandrew
  • 195
  • 10
  • 1
    Do the metafiles exist, or are they being ignored? – rutter May 30 '15 at 04:15
  • 1
    Hi, i have some questions to get more info ! If you try to run git ls-files *.meta you see your new meta files? If your meta files exists but aren't tracked by git, can you add them using git add my/new/file.meta ? What is inside .gitignore file (> cat .gitignore ) ? – mayo May 30 '15 at 04:17
  • The meta files exist. I verified with mayo's command. I was able to find the files and push the ones that I wanted to. But they still don't show up in my changed files list. I checked my gitigore and .meta is not listed. – Whelandrew May 30 '15 at 17:48
  • So, what I have learned is that Git is ignoring any metafiles that are created as new. I have to go in and manually add them from the list of ignored files. Afterwards, the files seem to be getting pushed through but they do not list as doing so. – Whelandrew Jun 02 '15 at 00:40

1 Answers1

1

You should edit your .gitignore file to not ignore meta files. .gitignore is a hidden file that can be anywhere inside your project structure but is normally found in the project's root folder.

It's not safe to ignore meta files unless they are folder meta files, so you should remove the *.meta that probably exists in your .gitignore file. If you want to ignore folder meta files, take a look at this question.

Community
  • 1
  • 1
Roberto
  • 11,557
  • 16
  • 54
  • 68