To start of, I am aware this is pretty bad practise in how to use git and I usually don’t abuse stashes like this.
For the past 1 month, I have been on and off with developing a feature, lets call it Feature A. During this time, instead of pushing to a branch I have been stashing the changes. I managed the stashes a lot of the time through VScode gitlens. During this time I’ve stashed the changes, worked on something else and then when I got back to Feature A I would apply the stash instead of using git pop.There is about 30 files in the stash.
I haven’t had any issues doing this until today when I applied the most recent stash again and I noticed at least 1 file and a few changes missing. Keep in mind that these changes wasn’t done it the most recent stash but instead about 2-3 weeks prior. I have no idea what happend to the changes. When I check all my previous stashes the file is just completely missing.
The file must have been in the stashes previously because otherwise I would have had this issue way earlier once I applied a previous stash. (The file missing was added rather early in the development of Feature A)
Does anyone have any idea how files can dissapear from the stash when you applied it. Specifically how you can apply a stash, not touch that stash for 3 weeks and then suddenly that stash just lost a file that was previously in it.
I’ve looked through all the previous stashes and the file is just missing in all of them. I expected it still to be there. The file is referenced in other files both in code and as such:
use PathToMissingFile;
I expected the file to still exist in the previous stashes that were applied or in any of the stashes.
opkawepo aijawe is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.