Pressing play or saving a file despite not changing it counts as a change in github?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By ThreeSpark

I’m using github and whenever I press play (witch auto-saves a scene) or save a scene, even if I haven’t made any changes, it counts as a change for github and I have to discard the change. Is there a way to bypass this?

:bust_in_silhouette: Reply From: Ertain

When a scene file is changed, some small detail in the file may have been changed. Git will track any small changes in the repository. Though there is a way to have git ignore some files for a little while.

Open up a terminal/prompt in the working directory/folder of the project. Type in the following git commands for the desired scene files (the ones to ignore):

git update-index --assume-unchanged <scene file to ignore>

This should make git ignore the scene file (or any other specified file) even when it’s been updated and changed frequently.

To have git monitor the file as normal, use the following command:

git update-index --no-assume-unchanged <scene file to monitor>

For more information, check out these sources: Git ready, Stack overflow answer.