I got the files to come back, but I don't want Android making these dumb delete-loads-of-newly-added-stuff commits

This commit is contained in:
interfect@b151490178830f44348aa57b77ad58c7d18e8fe7 2016-09-16 03:03:19 +00:00 committed by admin
parent d62ee47ab3
commit 7c5ff428a8

View file

@ -4,11 +4,11 @@ After not syncing my Android repo for a while, I tried to sync it. By some combi
I then synced in my main direct mode crippled filesystem repo with the only copy of some files, and got a bunch of messages that Git Annex was deleting files I wanted to keep. I killed that sync with a ctrl+c.
My problem is: how do I revert the offending commit and restore my files?
My problem (***UPDATE**: solved) is: how do I revert the offending commit and restore my files?
My other question is: how do I prevent this happening again? Is there a way I can pre-clear commits and not accept those that delete files without manual confirmation? Or should I just stop being mean to the Android client and hope it doesn't decide to delete things it shouldn't delete again?
My other question (not yet solved) is: how do I prevent this happening again? Is there a way I can pre-clear commits and not accept those that delete files without manual confirmation? Or should I just stop being mean to the Android client and hope it doesn't decide to delete things it shouldn't delete again?
I've tried a "git annex proxy -- git revert HASHOFBADCOMMIT", but (as I killed Git Annex before it got through recording that it had trashed my files), I just get:
I've tried a `git annex proxy -- git revert HASHOFBADCOMMIT`, but (as I killed Git Annex before it got through recording that it had trashed my files), I just get:
```
error: Your local changes would be overwritten by revert.
@ -18,6 +18,8 @@ fatal: revert failed
When syncing in a direct mode repo, does Git Annex happily delete the last copy of a file that appears to have been deleted somewhere else? Or does it save it until you manually clean up unused data, by moving it somewhere under .git?
**UPDATE**: A `git annex sync`, of all things, in the direct mode repository seems to have brought the files and their contents back. It created a commit that undid the deleting commit, except for the deletion of a duplicate copy of one file, which I don't need to have.
### What steps will reproduce the problem?
It's not entirely clear. Some combination of interrupting and restarting the Android app can make it think that files have been deleted when they really have never been created.