Today I had RStudio and Github Desktop open simultaneously, not thinking about what could go wrong if I did something dumb. I did a dozen or so commits on a project with a couple of branches, master and branch2. Within the last few commits I made, changes included the idiotic move of adding .Rdata and .Rproj to .gitignore, because I didn't want that file pushed to public remote repo. Somewhere around those commits (which I pushed to remote) I experienced an unusual and serious problem: large numbers of files that only ever existed on branch2/Applications went missing. Some (a small percentage) showed up on master/Applications, even though master/Applications never existed before today!
I completely forgot how RStudio and version control are intimately tied up with R projects. RStudio was open this whole time I was modifying .gitignore and using Github to switch back and forth between branches.
I'm looking for someone with a good grasp on the way RStudio requires projects for version control use, so I can describe further details to them and hopefully get me on a path to solving a mess that I do not know how to deal with.
Note -- all this is local, and I never committed or pushed the branch2/Applications folder, so I do not have a backup. Like I said, most of them just seemed to have disappeared. Fortunately they are not mission critical files, but boy it would help to have them back.
Thanks,
Gary