# Unity generates changes in GitHub on saving scene

So, here is my problem.

First I have a look at the changes in the repository which I am working with.

Initially there are no changes:

Then I open up Unity, i don't make any changes and just save the scene:

I then go to GitHub Desktop and suddenly there are a lot of changes appearing which I did not make:

How can I avoid that?

The files which are getting changed are .prefab files.

• Have you committed and fetched at least once? – user100681 Dec 3 '17 at 12:55
• @GabrieleVierti, yes I did. – trafalgarLaww Dec 3 '17 at 13:06
• @GabrieleVierti, every time I need to commit I have to go through all that unnecessary changes and chose and commit only those that were generated by me. – trafalgarLaww Dec 3 '17 at 13:07
• @GabrieleVierti, and there are seems to appear more and more changes after saving scene. I mean every time I commit then the next time I save scene there a few more unknown changes. – trafalgarLaww Dec 3 '17 at 13:08

Those changes seem to be of .meta file contents, and/or scene stuff [Update: As pointed out in the comments, they seem to be prefab data. But the issue and solution are the same]. It's not unthinkable that some floats will have the least significant bits changed due to floating-point precision errors. You can just ignore the fact that those changes exist, and commit them.

Don't worry... A position or rotation changed by 1e-6 (0.000001; BTW, yours are, like, 1e-12+ [0.000000000001]) is not going to have any noticeable difference in most games (in fact, unity considers anything with difference under 1e-5 as "equal", if you look at the source code). Your game would need to be a game like KSP trying to shoot something across the solar-system to hit a relatively tiny target in order for those to make a noticeable difference. =D
• @immibis Well, you don't get much of a choice; .meta files are necessary for the project to work correctly, AFAIK; not committing those would mean that your remote repo does not represent the same as your local repo(s), breaking the primary purpose of having version-control in the first place, and then, even if that wasn't the case, it would give you hell later and/or when working on teams. This is why, basically, all VCS tutorials on unity tell you to configure unity so that it makes .meta files plain-text, so that VCS can work with them easily (because you need to commit them). – XenoRo Dec 3 '17 at 22:50
• @immibis I meant that you can't .ignore the files, and exactly because the changes are 1e-6, and will have no noticeable result in-game, you're better off just committing them. --- If you want to waste effort on reviewing which changes to commit and which not to, I can't understand the logic in that, but do whatever you feel like. 🤷 (BTW, about "moving objects in the order of 1e-6, that's not the question, that's my answer) – XenoRo Dec 3 '17 at 23:13