python-github-backup icon indicating copy to clipboard operation
python-github-backup copied to clipboard

Abandoned branches (force push) and changed labels

Open ecki opened this issue 6 years ago • 3 comments

What would be nice if the incremental backups could detect force pushes or changes to tags and keep the abandonded trees around with a specific label. Maybe a reflog style feature? Or just generate well-known branches? This way we dont need to fear that backing up would lose old state (without having multiple full backups)

ecki avatar Dec 22 '18 00:12 ecki

Sounds like that's going to be very difficult to implement. Do you have a pull request for this or proof of concept code?

josegonzalez avatar Dec 22 '18 01:12 josegonzalez

I noticed that the reflog is actually written, so while it is not immediately visible that a forced change has occurred at least you can (if you had a backup of the previous state) detect it. Unfortunately that does not work for tags. (and --prune is given, maybe this should be removed? - although it should not affect remote tags)

I am not too deep into python or the GIT api, so I don't have a good idea for a PR as of now. Hopefully the discussion inspires people. What I think I would is to actually have multiple backups (each month a new one), so I have some long term stability and it helps against corruption.

ecki avatar Dec 24 '18 02:12 ecki

Seems like that extra complexity - distinct backups - should be handled outside of this tool?

josegonzalez avatar Dec 25 '18 09:12 josegonzalez