{"thread":{"id":"61712","subject":"Trouble with Gaia binary files","startedAt":"2024-07-01T15:34:15Z","lastAt":"2024-07-01T20:52:26Z","messageCount":3,"participants":["Alec Sanders","brian m. carlson","rsbecker@nexbridge.com"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"497901","messageId":"CA+Gods=0N9yYZ2tMSiV2GRO2uwpQTvvWB=Gcv9CfS4XrMYWN=A@mail.gmail.com","threadId":"61712","inReplyTo":null,"subject":"Trouble with Gaia binary files","fromName":"Alec Sanders","fromEmail":"aws022@bucknell.edu","sentAt":"2024-07-01T15:34:04Z","receivedAt":"2024-07-01T15:34:15Z","isPatch":false,"sender":{"key":"aws022@bucknell.edu","avatar":null},"body":"Hello,\n\nI am running into an issue with Git and Gaia files\nThis error persists when I perform a git checkout or git merge.\nThe error is as follows\n\nerror: Your local changes to the following files would be overwritten\nby checkout:\n\n*Insert filepath here*\nFilepath directs the user to the project folder and within it, Assets,\nGaia User Data, Sessions, ... , Terrain data, etc\n\nPlease commit your changes or stash them before you switch branches.\naborting\n\nThank you\n\n\n-- \nAlec Sanders\nB.S. Computer Science\nBucknell University 2025\nCollege of Arts and Sciences\n"},{"id":"497928","messageId":"ZoMOLz--NK_U6sst@tapette.crustytoothpaste.net","threadId":"61712","inReplyTo":"CA+Gods=0N9yYZ2tMSiV2GRO2uwpQTvvWB=Gcv9CfS4XrMYWN=A@mail.gmail.com","subject":"Re: Trouble with Gaia binary files","fromName":"brian m. carlson","fromEmail":"sandals@crustytoothpaste.net","sentAt":"2024-07-01T20:14:39Z","receivedAt":"2024-07-01T20:14:43Z","isPatch":false,"sender":{"key":"sandals@crustytoothpaste.net","avatar":"https://avatars.githubusercontent.com/u/497054?v=4"},"body":"On 2024-07-01 at 15:34:04, Alec Sanders wrote:\n> Hello,\n> \n> I am running into an issue with Git and Gaia files\n> This error persists when I perform a git checkout or git merge.\n> The error is as follows\n> \n> error: Your local changes to the following files would be overwritten\n> by checkout:\n> \n> *Insert filepath here*\n> Filepath directs the user to the project folder and within it, Assets,\n> Gaia User Data, Sessions, ... , Terrain data, etc\n> \n> Please commit your changes or stash them before you switch branches.\n> aborting\n\nThis message isn't particular to any given type of file.  What it means\nis that your files are modified in the working tree and the operation\nyou want to perform (a checkout or a merge) will modify the working\ntree.  Because doing that operation would destroy data, Git asks you to\ndo something specific to make your working tree clean before you can do\nthat operation.\n\nI'm not familiar with Gaia, but in the case that you're using Git LFS,\nthis could be caused by using Git LFS incorrectly, whether by you or\nsomeone else, that can lead to files being perpetually marked modified.\nIf a file is tracked as a Git LFS file (that is, the file type is listed\nas `filter=lfs` in `.gitattributes`), but someone has checked in the\nfile without installing or enabling Git LFS (that is, as a regular\nfile), then the file will end up always modified.\n\nThat happens because if the file is updated in the working tree, Git\ntries to run the clean filter to turn it into a pointer file, and since\nthat differs from what's in the repository (which is the full file), Git\nmarks it as modified.  Attempting to check out or reset the file causes\nthe same thing to occur, resulting in the same situation.\n\nIn any event, if you _do_ want to keep the changes, you should run `git\nstash` to stash the changes, and then checkout or merge.  If you _don't_\nwant the changes and you are really certain you want to destroy all of\nthem, you can run `git reset --hard` (this really does destroy them, so\nbe careful).\n\nIf you have the Git LFS problem I mentioned above, `git reset --hard`\nwill not fix the problem.  In such a case, you will need to do `git add\n--renormalize .` and then `git commit` to fix the state of the branch.\nYou'll need to do this to every affected branch.  You can also run `git\nlfs fsck --pointers BASE..HEAD` (substituting `BASE` and `HEAD`) in your\nCI system, which will exit nonzero and print an error if someone does\nthis again.\n-- \nbrian m. carlson (they/them or he/him)\nToronto, Ontario, CA\n"},{"id":"497934","messageId":"073501dacbf7$3d4825b0$b7d87110$@nexbridge.com","threadId":"61712","inReplyTo":"ZoMOLz--NK_U6sst@tapette.crustytoothpaste.net","subject":"RE: Trouble with Gaia binary files","fromName":"","fromEmail":"rsbecker@nexbridge.com","sentAt":"2024-07-01T20:42:44Z","receivedAt":"2024-07-01T20:52:26Z","isPatch":false,"sender":{"key":"randall.becker@nexbridge.ca","avatar":"https://avatars.githubusercontent.com/u/28956764?v=4"},"body":"On Monday, July 1, 2024 4:15 PM, brian m. carlson wrote:\n>On 2024-07-01 at 15:34:04, Alec Sanders wrote:\n>> Hello,\n>>\n>> I am running into an issue with Git and Gaia files This error persists\n>> when I perform a git checkout or git merge.\n>> The error is as follows\n>>\n>> error: Your local changes to the following files would be overwritten\n>> by checkout:\n>>\n>> *Insert filepath here*\n>> Filepath directs the user to the project folder and within it, Assets,\n>> Gaia User Data, Sessions, ... , Terrain data, etc\n>>\n>> Please commit your changes or stash them before you switch branches.\n>> aborting\n>\n>This message isn't particular to any given type of file.  What it means is that your\n>files are modified in the working tree and the operation you want to perform (a\n>checkout or a merge) will modify the working tree.  Because doing that operation\n>would destroy data, Git asks you to do something specific to make your working\n>tree clean before you can do that operation.\n>\n>I'm not familiar with Gaia, but in the case that you're using Git LFS, this could be\n>caused by using Git LFS incorrectly, whether by you or someone else, that can lead\n>to files being perpetually marked modified.\n>If a file is tracked as a Git LFS file (that is, the file type is listed as `filter=lfs` in\n>`.gitattributes`), but someone has checked in the file without installing or enabling\n>Git LFS (that is, as a regular file), then the file will end up always modified.\n\nI have seen this situation resulting from security attribute mismatches under Windows. If the Gaia generated files are executable and core.filemode=true and/or the files are not added with --chmod=+x, this can be persistent. This sometimes gets past git status in a Cygwin shell but shows up as a difference in ECLIPSE.\n\n>That happens because if the file is updated in the working tree, Git tries to run the\n>clean filter to turn it into a pointer file, and since that differs from what's in the\n>repository (which is the full file), Git marks it as modified.  Attempting to check out\n>or reset the file causes the same thing to occur, resulting in the same situation.\n>\n>In any event, if you _do_ want to keep the changes, you should run `git stash` to\n>stash the changes, and then checkout or merge.  If you _don't_ want the changes\n>and you are really certain you want to destroy all of them, you can run `git reset --\n>hard` (this really does destroy them, so be careful).\n>\n>If you have the Git LFS problem I mentioned above, `git reset --hard` will not fix the\n>problem.  In such a case, you will need to do `git add --renormalize .` and then `git\n>commit` to fix the state of the branch.\n>You'll need to do this to every affected branch.  You can also run `git lfs fsck --\n>pointers BASE..HEAD` (substituting `BASE` and `HEAD`) in your CI system, which will\n>exit nonzero and print an error if someone does this again.\n\n--Randall\n\n"}]}