Mobile build -786 small test

Miika Turkia miika.turkia at gmail.com
Tue Feb 9 06:34:40 PST 2016


On Tue, Feb 9, 2016 at 4:09 PM, Dirk Hohndel <dirk at hohndel.org> wrote:
> On Tue, Feb 09, 2016 at 11:46:25AM +0100, Anton Lundin wrote:
>> >>
>> >> What is the preferred method to clean the git repository? Purge from
>> >> server and recreate local one?
>> >
>> >This is something on my infinite todo list. We have no easy way to do
>> >that. The best I can think of is:
>> >
>> >- store to local XML file
>> >- send email to Dirk to re-init the repository on the server (because I
>> >  don't think you can do that remotely)
>> >- open the local XML file and save to cloud storage again
>> >
>> >If someone has a better idea, please let me know
>> >
>>
>> What about force push?
>>
>> Save your logs to a new local git branch and force push that new branch to the server, overriding the old one there.
>>
>> Does the cloud side allow force pushes?
>
> I'll admit that I haven't thought about that option. Something worth
> investigating.
>
> I'll add it to my list. Or you can play with this yourself if you feel
> ambitious. It's unlikely that you'd be able to break anything on the
> backend (and if you did, that would be a problem that needs fixing,
> anyway).

OK, here we go. So far this looks like a promising method :D
Using star in the commands assumes that there is only one directory
under cloudstorage, which should be the normal case (in reality I used
the correct path name as I took a backup to the same dir).

$ cd ~/.subsurface/cloudstorage/*
$ git checkout --orphan force
$ git add -A
$ git commit
$ git branch  -D miika.turkia at gmail.com
$ git branch -m miika.turkia at gmail.com
$ git push -u --force origin miika.turkia at gmail.com
$ cd .. && rm -rf *

* And finally open up the cloud storage on Subsurface desktop application.

And here is a proof that this exercise was worth it:
$ du -sh *
18M    ea800cd529d85edf
522M    ea800cd529d85edf.bk

I guess it is time to uninstall the Android app before going on and
screwing everything up by trying to sync the old git tree from there.

miika


More information about the subsurface mailing list