Page 1 of 1

Commit reverts file to an earlier state

PostPosted: Fri Jul 27, 2018 8:53 am
by kathryngz
Something very strange is going on. Yesterday I opened a snippet file I'd been using for weeks. Oddly, a section at the top and at the bottom had disappeared. I thought maybe I'd accidentally deleted the sections, though it didn't seem likely, as they were in separate places.

Then just a few minutes ago, I did a commit (we're using Bitbucket). I didn't push. Immediately afterward, the file I was working on reverted to an earlier state--and not just its state a day or two ago, but probably more like a week ago! A section at the top that I had deleted some time ago suddenly reappeared. A snippet reference got changed from the correct snippet to a previous one that has since been deleted. Headings I had deleted reappeared.

Now I assume that the first snippet file got reverted during a commit as well.

Another odd thing I just noticed: only the file I had open got reverted. I looked at several other files using the same structure and snippets, and they look fine.

Can anyone explain what's going on and how to avoid it going forward? I'm afraid to make any more commits for fear I'll keep losing my recent work. Any help would be greatly appreciated!