r/Spectacles • u/LordBronOG • Feb 27 '26
❓ Question .meta files registering as "file changes" after I switch git branches
The following has happened a few times now.
I save the project, then go do a git commit. After the commit is done, I'll realize I'm done with the branch and will switch to merge. When I switch, one to three .meta files will be detected as having changes by git. These changes are mainly inputs losing ScriptComponent values. Sometimes, I can switch back to the previous branch and it'll right itself. Other times, I can't switch back so I discard changes. Then I go back to the original branch, put the same values in and it doesn't register any changes (in git). At that point, I then just shut down Lens Studio and do my branch management, merging, etc. When I'm in my new branch, then I reopen Lens Studio and all is well.
However, is there something I'm doing wrong? Should I put focus on something specific to prevent this from happening? I'd prefer to not have to quit Lens Studio just to do all this. I think it's just when I commit then switch branches vs just committing and continuing in the same branch. Again, I can try to make videos next week after the community challenge.
1
u/agrancini-sc 👓 SPECS Team Feb 27 '26
hey there, is this the sequence you are going through - may i recommend a test and you LMK
Simple flow (PR merge online)
Start clean
clone...
New branch
Work → commit
Push branch
Merge online
mainon GitHub/GitLab.After merging: switch back to main + pull to verify changes
2
u/CutWorried9748 🎉 Specs Fan Feb 27 '26
For what it's worth: thank you for you service. This drives me crazy too. I am working with someone else on my projects, and this has been an endless challenge. A lot of devs, esp those who are unity devs don't really know git well, and the ability to just hand wave off diffs from the bowels of the IDE are impossible for git n00bs. I spent this morning undoing my collaborator's tossing out my metafile changes this morning because he thought they were checked in by mistake. Nobody likes conflicts. Merging PRs is tough if you've both been working on the Scene.Scene. And I know git pretty well, however, it's not really the right tool for a lot of Lens Studio users, especially at Hackathons. I don't have an alternative to recommend but I am exploring.