python-github-backup
python-github-backup copied to clipboard
Abandoned branches (force push) and changed labels
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)
Sounds like that's going to be very difficult to implement. Do you have a pull request for this or proof of concept code?
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.
Seems like that extra complexity - distinct backups - should be handled outside of this tool?