I recently ran some code and clearly saw it working.
I then switched to a different branch and when I switched back to my starting branch the thing i had observed working moments before stopped working.
After carefully checking the file It turns out that some code in one particular file had dissapeared.
- Git did not warn me that I had un-committed changes or any other warning before switching branches.
- Some changes which were made AFTER the missing code was written are still in the head commit of the branch in question both locally and on gitlab - I am absolutly certain that these changes were made AFTER the missing code was made and i have a witness to support me on this.
- Only one file is effected and the later code which was persisted in a git commit is from other files.
What could have caused this?