import os from shellrun import run from datetime import datetime hist = sorted([name for name in os.listdir('.') if name.startswith('appvey') and name != 'appvey.py']) print('\n'.join(hist)) for f in hist: tstamp = datetime.fromtimestamp(os.path.getmtime(f)) run('copy {} appvey.py'.format(f)) run('git add appvey.py') run('git commit -m "hacking.." --date "{}"'.format(tstamp))