*Devs should never use git push --force*. Unless you you pushed sensitive data. git push --force <https://stackoverflow.com/questions/5509543> could destroy Leo's repo.
But brain spikes do happen. The following script will use git bundle <https://stackoverflow.com/questions/5578270> to create a complete backup of Leo's repo in a single file. This has other uses besides backup. I encourage Leo's core devs to run this script (suitably modified for your machine), from time to time: import os import subprocess import sys import time win = sys.platform.startswith('win') old_dir = g.os_path_abspath('.') ### Change the following for your machine if win: new_dir = r'C:\leo.repo\leo-editor' path = r'C:\Users\edreamleo\Backup' else: new_dir = '/home/edward/leo.repo/leo-editor' path = '/home/edward/Backup' assert g.os_path_exists(new_dir), repr(new_dir) assert g.os_path_exists(path), repr(path) stamp = time.strftime("%Y%m%d-%H%M%S") fn = g.os_path_finalize_join(path, 'leo-bundle-all-%s' % (stamp)) bundle_command = 'git bundle create %s --all' % fn print(bundle_command) os.chdir(new_dir) # os.system(bundle_command) proc = subprocess.Popen(bundle_command, shell=True) proc.wait() os.chdir(old_dir) print('done! wrote %s' % fn) Edward -- You received this message because you are subscribed to the Google Groups "leo-editor" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/leo-editor. For more options, visit https://groups.google.com/d/optout.
